Key Reset
Loading "Key Reset"
Run locally for transcripts
π¦ Interestingly, we can use the
key
as a mechanism for removing and re-adding
elements to the DOM. This is useful when we want to reset the state of a
component or elements within a component.We haven't covered state yet, but state is necessary for this exercise so that's
done for you. All we need you to do is add the key prop and see how that affects
the state of the app. Enjoy!
π¨βπΌ Type in the input, then click "reset" and think about why that works the way
it does.