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 | 22.9.0 | 2 | |
frontend-app-admin-portal | 21.13.1 | 38 | |
frontend-app-authn | 22.10.0 | 2 | |
frontend-app-communications | 22.7.0 | 2 | |
frontend-app-course-authoring | 22.8.1 | 60 | |
frontend-app-discussions | 22.7.0 | 9 | |
frontend-app-enterprise-public-catalog | 21.13.1 | 1 | |
frontend-app-learner-dashboard | 22.9.0 | 3 | |
frontend-app-learner-portal-enterprise | 21.13.1 | 16 | |
frontend-app-learner-record | 22.10.0 | 1 | |
frontend-app-learning | 22.8.1 | 4 | |
frontend-app-support-tools | 21.13.1 | 4 | |
frontend-component-header-edx | 21.13.1 | 1 | |
frontend-component-header | 22.10.0 | 1 | |
frontend-lib-special-exams | 22.7.0 | 3 | |
prospectus | 20.46.2 | 2 |