Join Alex Banks for an in-depth discussion in this video Setting up the React router, part of Building a Polling App with Socket IO and React.js.
- Our application is going to have three main screens.…One for the speaker, the leader of the presentation;…and one for each audience member;…and then one for the Board.…So we're going to need to incorporate some routes…to handle those screens.…I have a copy of the solution running on…localhost:3210,…and what you'll notice is I have a little hashtag here…that indicates client routes.…So our Audience screen is going to be the homepage.…However, if we type #/speaker,…we will see the Speaker screen,…which is a different React component.…
And if we type #/board, we will see the scoreboard,…which is the third React component.…And we can get back to the Audience component…just by going to the #/, which represents our DefaultRoute.…So now we need to incorporate the React router…so that we can add this functionality to our APP.…I'm going to go ahead and open up the terminal.…And from the terminal, we will install that React router…by saying npm install,…and sending it the save flag so it saves this dependency…to the package.json.…
- Setting up the environment
- Connecting sockets
- Handling disconnects
- Setting up the React.js router
- Passing state to child components as properties
- Joining the presentation
- Starting and running the presentation
- Asking and answering questions
- Graphing results
- Upgrading to ES6
Skill Level Intermediate
Building a Responsive Single-Page Design with Sasswith Ray Villalobos4h 55m Intermediate
1. Setting Up the Environment
Setting up npm scripts4m 22s
2. Connecting Sockets
3. App State and Routes
4. Joining the Presentation
5. Starting the Presentation
6. Questions and Answers
7. Graphing Results on a Scoreboard
8. Upgrading to ES6 Syntax
Next steps1m 1s
- 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.