State Initializer
(See readme.mdx)Adding an initializer to the useReducer hook allows us to set the initial state based on props or other dynamic values, and also provides a way to reset the state back to its initial value. In this example, we can initialize the toggle state to be on or off based on an `initialOn` prop, and we can reset it back to that initial state when needed.
Attention the initial state is setted to TRUE, to reset it to FALSE you need to click on the toggle button and then click on reset
To reset it to FALSE you need to click on the toggle button and then click on reset
With Keys
Example adding and changing keys it removes the animation on reset