MCPcopy Create free account
hub / github.com/reactstrap/reactstrap / toggle

Function toggle

stories/examples/Accordion/AccordionExample.js:11–17  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

9function Example(props) {
10 const [open, setOpen] = useState('1');
11 const toggle = (id) => {
12 if (open === id) {
13 setOpen('');
14 } else {
15 setOpen(id);
16 }
17 };
18
19 return (
20 <div>

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…