Stability

Loading "Stability"
๐Ÿ‘จโ€๐Ÿ’ผ We've noticed that if someone passes an initialOn that's based on state, then calling reset will sometimes change the state to the wrong value based on what the initialOn was set to at the time the component was initialized.
This is confusing and we want to make certain to avoid it.
๐Ÿงโ€โ™‚๏ธ I've put together a simple example of this for you to experiment with. You'll notice we now have a button for toggling the initialOn state which we pass as an option to useToggle. So if you toggle the initialOn state and then click the reset button, you'll notice it resets to the current initialOn state, not the original one.
๐Ÿ‘จโ€๐Ÿ’ผ This is a little confusing for users of the useToggle hook, so please fix this issue! Thanks!
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 ยท 4 days ago