Join Alex Banks for an in-depth discussion in this video React ES6 properties, part of Building a Polling App with Socket IO and React.js.
- When working with ES6 in React,…there's something different that we have to do…when working with the Property types.…Now I have the Header component opened in front of us…and I am going to go ahead…and modify this to use that class syntax,…class Header extends…React.Component.…And to do this, I'm going to scroll down here to line 29…and also get rid of the semicolon and the parentheses.…Now when we extend a class,…what we're actually doing is adding a list of functions…that would get added to the prototype.…
This Property right here can not be added…to that prototype and work correctly…in this React.Component.…Further more, the getDefaultProps…of the component life cycle is no longer supported…inside of the React.Component.…So we have to do a little something different…with these propTypes and getDefaultProps.…I want to go ahead and highlight from line 13 to line five…and just simply cut them out.…So I can go ahead and take those…and paste them here down on line 19.…And what we're going to do is as opposed…to declaring the property types…
- 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.