useToggle
Toggle a boolean value on or off with handlers
const [state, setOn, setOff, toggle] = useToggle(initialState, handlers);
Sample Usage
Show editable code example
Any Paragon component or export may be added to the code example.
Basic Usage
Show editable code example
Any Paragon component or export may be added to the code example.
Usage Insights#
useToggle
Project Name | Paragon Version | Instance Count | |
---|---|---|---|
frontend-app-account | 20.28.5 | 1 | |
frontend-app-admin-portal | 20.26.3 | 12 | |
frontend-app-authn | 20.34.0 | 2 | |
frontend-app-communications | 20.30.1 | 2 | |
frontend-app-discussions | 20.15.0 | 9 | |
frontend-app-enterprise-public-catalog | 20.29.0 | 1 | |
frontend-app-learner-dashboard | 20.32.0 | 3 | |
frontend-app-learner-portal-enterprise | 20.31.1 | 10 | |
frontend-app-learning | 20.28.4 | 1 | |
frontend-lib-special-exams | 20.22.4 | 4 | |
prospectus | 20.32.3 | 2 |