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