MCPcopy Index your code
hub / github.com/react/react / toggleTabs

Function toggleTabs

compiler/apps/playground/components/AccordionWindow.tsx:65–76  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63 const transitionName = `accordion-window-item-${id}`;
64
65 const toggleTabs = () => {
66 startTransition(() => {
67 addTransitionType(EXPAND_ACCORDION_TRANSITION);
68 const nextState = new Set(tabsOpen);
69 if (nextState.has(name)) {
70 nextState.delete(name);
71 } else {
72 nextState.add(name);
73 }
74 setTabsOpen(nextState);
75 });
76 };
77
78 // Replace spaces with non-breaking spaces
79 const displayName = name.replace(/ /g, '\u00A0');

Callers

nothing calls this directly

Calls 4

startTransitionFunction · 0.90
addTransitionTypeFunction · 0.85
addMethod · 0.80
hasMethod · 0.65

Tested by

no test coverage detected