 Welcome back to react holiday. I'm Chantastic and today, today we're talking about state, we're going to add a little bit of dynamism and interactivity to our application. Let's dive in. Now, right now I have a collection of Pokemon and off of that collection, I am using an index to say which one I want to show right now. It's a index zero, which is Bulbasaur. I can change that to one, but I'm the only person that can change that. I'd like the user to be able to scrub through these as they please. So in order to do that, we need to give them some UI. We'll use a button for that. Uh, and that button is going to need a function to call when it is clicked. So how do we get that function? Well, react to the rescue, uh, react is just a really cool API for this called use state. It's just a function that we give some type of default state to, in our case, uh, the number zero, and it's going to return an array. Now I'm going to use destructuring assignment to set the values of that array. Uh, so I'm going to use a reverse object literal syntax to say, Hey, I know I'm getting an array back. The first element in that I'd like to assign to the variable index. And the second is a function, the function we need to update the UI. I'm going to call that set index. Now, as soon as I assigned to index, well, we have that again. And the app works, but we need to give on click our, uh, our function to call and set the index. So let's do that. Uh, we're going to call set index. We're going to use the current value of index that we have right here. And, uh, just add one to it. Nice and easy. Nothing complicated. Uh, now let's see if that did the trick. Oh my gosh, we did it. Super easy. We just take our state that we had anyway, we give it to react.use state. It gives us an array back. First element is the value. Second element is the function that we need to call to update that state. Super easy. Well, we're even worried about use state. It's awesome. Now we have one little problem. If we go off the edge of this array, well, everything breaks. We'll fix that tomorrow.