Learn about using default props to populate a page with dummy data.
- [Instructor] Our last step is that we're going to…connect all this dummy data into our list.…We're going to make use of that game record component…that's giving us a warning in our console.…To do that, we're going to create a function…here on line 29.…We're going to use get records.…Now notice how I prefixed this function with the phrase get.…That means that this is an automatically invoked function.…A lot of times when I'm creating functions that I know…are just going to run to fetch data,…I'll use this get syntax to make sure that they…automatically fetch as soon as the component loads.…
On line 30, the first thing I'm going to do…is start by saying what I'm going to return.…I know that my get records function is going to…want to return an array of my records.…This is another opportunity for me to use the…map method on an array.…So I'm going to say return.…And then this is where I'm storing…my game record information…this.props.user.games.…So the games key on the user object is where…I can look at my games.…
- Installing local dependencies
- Generating a starter project
- Deploying to Heroku
- Planning your development process
- Using styled-components
- Styling for mobile
- Setting up models on Graphcool
- Creating Relay mutations
- Adding Relay to your authentication flow
- Protecting routes with authentication
Skill Level Intermediate
Building a Web Interface with React.jswith Ray Villalobos1h 21m Intermediate
2. Deployment Environments
3. App Functionality
4. Implementing Libraries
5. Creating Components
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
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.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.