Create a new form to edit a player, create a state to show or hide the form along with the proper functions to pass the data from the current player in state. Use the set MongoDB method to properly update the player in the collection.
- [Instructor] In this video, we're finally ready…to create the Edit Player form.…So, the first thing you'll do…is go into the UI folder and right-click…and create and brand-new file,…and call it EditPlayer.jsx, like so.…Let's make our life a little bit easier,…and go into the New component,…and basically copy and paste everything that's in there.…Because if you look at the New…and the actual EditPlayer form,…it's going to be the exact same thing.…
We're just going to add a few things in there.…So let's refactor the New form into the EditPlayer form.…The very first thing, you don't need to have any of those.…We can remove that, make sure you change…your component to Edit.…Next thing, you want to edit the current function…that we have, and call it editPlayer.…And in this form, pretty much the exact same thing…will be in the object.…In fact, the only thing that we're going to add…in this object is an ID.…
And the reason why,…it's because that player has already been created,…so the only thing that we need…is basically grab that into that object,…
- Setting up your editor
- Understanding the file structure and player components
- Setting up static data
- Routing with React
- Creating a schema and player form
- Building functions to add a player
- Adding a user login
- Assigning players to the user
- Securing database transactions
- Editing and deleting players
- Using Chart.js to display team stats
Skill Level Intermediate
Learning Meteor Application Developmentwith Isaac Strack1h 52m Intermediate
1. Setting Up
2. React Refresher: Basic Player View
3. Reduce Player Stats
4. Players CRUD and Team View
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.