Initialize Toggle
Loading "Initialize Toggle"
Run locally for transcripts
๐จโ๐ผ Our toggle component should be able to be customizable for the initial state
and reset to the initial state.
๐งโโ๏ธ I've updated the toggle component to use a reducer instead of
useState
. If
you'd like to back up, and do that yourself in the playground, by my guest. Or
you can check my work instead.๐จโ๐ผ Please add a case in our reducer for the
reset
logic, and add an option to
our useToggle
hook for setting the initialOn state.