1import { useField } from 'react-final-form';
3// inspired by: https://codesandbox.io/s/lm4p3m92q
4// renders childen if the relevant field's value is the test value
5export default function Condition({ when, is, children }) {
8 } = useField(when, { subscription: { value: true } });
10 return value === is ? children : null;
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list