We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
it's beneficial for a toggling function to have an optional argument that, if set to true or false, will force the toggle to that state.
true
false
This is handy in such cases:
const {visible, toggle} = useVisibilityState(); const foo = bar => toggle(bar) // where bar is a Boolean state
instead of:
const {visible, show, hide} = useVisibilityState(); const foo = bar => { if (bar) show() else hide() }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
it's beneficial for a toggling function to have an optional argument that, if set to
true
orfalse
, will force the toggle to that state.This is handy in such cases:
instead of:
The text was updated successfully, but these errors were encountered: