Learn about setting up the functionality for a game.
- [Instructor] Now, I'm going to initialize…another variable, called squares…with a lowercase, and I'm going to set this…equal to coordinates….map.….map is a method that's available to arrays.…It's going to look at the current contents of coordinates…and then return a new array,…based on the parameters that we give to it.…It accepts an arrow function as an argument,…and that arrow function can accept…another two arguments, position and index.…
We'll finish that arrow function…with a pair of brackets.…This is where we're going to specify…what we want to be created in this new array…that .map will return.…I know that I want each of the individual squares…that's going to go into the squares array…to have access to the move function…that we declared up here on 42…and we originally created in our Tic-Tac-Toe containers.…I'm going to say…let makeMove…equal move.…Then, I also want to make sure each of the squares…that I built has access to the mark that should go in it.…
Remember from several videos ago,…I said I'm going to be storing…
- 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
React.js: Building an Interfacewith 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.