Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/adobe/react-spectrum
/ toggleState
Function
toggleState
packages/react-stately/src/toggle/useToggleState.ts:79–83 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
77
}
78
79
function
toggleState() {
80
if
(!isReadOnly) {
81
setSelected(!isSelected);
82
}
83
}
84
85
return
{
86
isSelected,
Callers
nothing calls this directly
Calls
1
setSelected
Function · 0.70
Tested by
no test coverage detected