课程: Hands-On Introduction: React
免费学习该课程!
今天就开通帐号,24,700 门业界名师课程任您挑!
Adding buttons to your modals
- I want to do one more thing to this application and that is I want to go ahead and add some buttons that allows me to navigate through the different characters. However, I'm going to let you try to do it before you watch me do it this time. Hopefully you've been following along with everything that I've been doing and typing some of the code. But this time I want you to think how you would do something like that. I've given you enough react to be able to do this yourself and I want you to try to do it before you watch me do it. I'll go ahead and wait a second for you to give it a shot and then you can come back here and we'll see what I do. (upbeat music plays) All right. I think you're going to enjoy the way that you do this kind of thing in react because it's a little bit different and it's actually quite simple. So let's go ahead and start off by creating something in the modals file. So I'll go to modals.jsx and here…