MCPcopy Create free account
hub / github.com/Okabe-Rintarou-0/BookStore-Frontend / toggle

Function toggle

advanced_tutorial/src/cases/case1.tsx:7–9  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5 const [value, setValue] = useState<boolean>(false);
6 const MyRadio = (props: RadioProps) => <Radio checked={value} onClick={toggle} {...props}></Radio>
7 const toggle = () => {
8 setValue(value => !value);
9 }
10 const select = () => {
11 setValue(true);
12 }

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected