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.…
Author
Released
9/9/2015- 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
Duration
Views
Related Courses
-
Building a Responsive Single-Page Design with Sass
with Ray Villalobos4h 55m Intermediate
-
Introduction
-
Welcome47s
-
Using the exercise files2m 27s
-
-
1. Setting Up the Environment
-
Setting up npm scripts4m 22s
-
2. Connecting Sockets
-
Incorporating Socket IO5m 46s
-
Displaying connection status5m 55s
-
Handling disconnects6m 5s
-
-
3. App State and Routes
-
Adding a default title3m 32s
-
Setting up the React router12m 19s
-
4. Joining the Presentation
-
Creating a display component6m 59s
-
Creating the join form5m 55s
-
Emitting a join event6m 23s
-
Saving audience state5m 49s
-
-
5. Starting the Presentation
-
Build speaker form13m 54s
-
Broadcasting speaker data6m 29s
-
Display attendance7m 54s
-
-
6. Questions and Answers
-
Asking a question8m 37s
-
Setting up multiple choices12m 37s
-
Answering a question11m 36s
-
7. Graphing Results on a Scoreboard
-
Connecting the board7m 32s
-
Graphing the results8m 49s
-
-
8. Upgrading to ES6 Syntax
-
Using ES6 imports3m 4s
-
Using ES6 class syntax1m 18s
-
React ES6 properties2m 8s
-
ES6 arrow functions8m 17s
-
React ES6 class state4m 16s
-
-
Conclusion
-
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.
CancelTake 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.
Share this video
Embed this video
Video: Emitting a join event