Initialize Toggle

Loading "Initialize Toggle"
๐Ÿ‘จโ€๐Ÿ’ผ 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.
Login to get access to the exclusive discord channel.
  • General
    Welcome to EpicReact.dev! Say Hello ๐Ÿ‘‹
    Kent C. Dodds โ—† ๐Ÿš€๐Ÿ†๐ŸŒŒ:
    Welcome to the first of many posts in the EpicReact.dev channel! Take a moment to introduce yourself...
    0 ยท 3 days ago