toggle
v0.0.1arrow_drop_downv0.0.1
STATUS
Passing
DOWNLOADS
44
VISIBILITY
Public
PUBLISHED
6 years ago
SIZE
744 B
1 contributor
Like
Install toggle as a package?
Copied
npm i @bit/giladshoham.react-hooks.power-hooks.toggle
Set Bit as a scoped registryLearn more
npm config set '@bit:registry' https://node.bit.cloud
Component Example
React
React
Vue
Angular
React Native
Add dependency... help_outline
Just
and packages in Bit or NPM to the example. any of the 1 million componentstoggle layout
chevron_left
chevron_right
useToggle
This is a hook that lets you toggle between boolean values.
It needs an initialValue
to work with.
Usage
const initialValue = true;
const [currentValue, toggleAway] = useToggle(initialValue);