Current section: useState 16 exercises
solution

Reassign state to a New Value

Transcript

00:00 So let's change our state declaration to a let so that we can reassign it and then we're going to accept the new state new state this is going to be of type state and then here we'll set the new state to that and now we no longer have this problem save this and I click the button and nothing is happening still

00:18 well things are technically happening but we're not seeing that reflected in the UI and that is a problem that we'll get to in the next step but that this pretty straightforward we just need to take this state reassign it and then our set state call will accept that state so that we can reassign that state so well

00:37 done