Join Carl Peaslee for an in-depth discussion in this video Creating your logger, part of React: Lifecycles.
- [Narrator] Okay, now that we have a good idea of some…of the methods we can use while we're creating our…component, we're going to actually begin to build…our logger.…I'm going to go through and delete some of this stuff.…We're going to get rid of 16 through 19.…That was just to teach us about the context and find.…I'm going to get rid of 11 through 14,…and I'm also going to get rid of this constructor function,…because we don't need any of that.…And then I'm also going to delete everything…between line 9 and line 19.…These are those buttons that were testing those methods.…
And again I'm just going to put hello here again.…So we have most of the things cleaned out of our app,…and now we're going to make a new file…in our source directory, so we'll make a new file,…and I'm going to call this loggify.js,…and loggify is going to be the name of the function…that we're going to call…to create our higher order component.…The first thing we're going to do in this loggify.js file,…is we're going to import react and the component.…
Carl Peaslee helps you build a number of small reusable components that will be useful in future projects. Along the way, he discusses the syntax and uses of lifecycle methods, how state affects React lifecycles and your apps, and how to set static display name, default props, and initial state. Plus, learn how to gather performance data and improve performance by minimizing component updates.
- Overview of React lifecycles
- Initial state
- Default props
- Mounting: componentWillMount, componentDidMount, and render
- Updating: shouldComponentUpdate, componentWillUpdate, and componentDidUpdate
- Controlling component updates
- Using react-addons-perf to get performance data
Skill Level Intermediate
React.js: Building an Interfacewith Ray Villalobos1h 21m Intermediate
1. Overview of Lifecycles
2. Defaults, Initialization, and Construction
5. Optimizing Components
- 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.