Join Alex Banks for an in-depth discussion in this video Emitting a join event, part of Building a Polling App with Socket IO and React.js.
- So once we have collected the audience member's name,…we're going to need to send it back to the server.…We're going to do this by emitting a join event…on the socket and passing the audience member's name…all the way back to the server.…So we're going to be using several files to do this.…I'm going to start by opening up our app-server.…So this is the file that we should…eventually collect the user's name in.…Now all data that communicates between the client…and the server actually goes through our app-component.…So I'm going to go down to our components…and open up the app.…So this is where we wire up the listeners…for any events that socket io is going to throw,…and we're also going to add an emit function to this…so that we can send data back to the server.…
Now we're concerned with the audience now,…so in the app we have a RouteHandler,…and that RouteHandler is specifically going to be…our Audience component right now.…So the Audience component also uses this join form…here on line 11,…and this is where all of the magic starts.…
- 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.