Join Alex Banks for an in-depth discussion in this video Leaving and rejoining the speaker, part of Building a Polling App with Socket IO and React.js.
- The same issues that we had…with audience members disconnecting,…we also have with our speaker.…I have our application running here and localhost:3000,…and we have connected one audience member, Jesse,…and we also have Alex Banks as the speaker…leading the React Class.…Now, one of these problems happens when I refresh,…so when I refresh I lost my speaker homepage.…The other issue that occurs is when the speaker leaves,…so if I close this Socket,…that information has not been reflected in this…audience member Socket.…
So we have a couple rough edges to smooth out.…Let's go ahead and close these browser windows and…stop the server, and go back to Sublime.…So the place that we want to start handling this…is inside of our app server.…This is where we listen for disconnects.…Down here on line 18 is where we have our…Socket listening for a disconnect, and…this callback function, that spans from 18 to 31,…handles all disconnects.…Now on line 20, we are checking that audience array…to to see if this Socket is a member.…
- 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
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.