Skip to Content
React: Building Modern Web Applications
book

React: Building Modern Web Applications

by Jonathan Hayward, Artemij Fedosejev, Narayan Prusty, Adam Horton, Ryan Vice, Ethan Holmes, Tom Bray
June 2016
Intermediate to advanced content levelIntermediate to advanced
910 pages
18h 59m
English
Packt Publishing
Content preview from React: Building Modern Web Applications

Chapter 6. Update Your React Components

In the previous chapter, we learned that a React component can go through three phases:

  • Mounting
  • Updating
  • Unmounting

We've already discussed the mounting and unmounting phases. In this chapter, we're going to focus on the updating phase. During this phase, a React component is already inserted into the DOM. This DOM represents a component's current state, and when that state changes, React needs to evaluate how a new state is going to mutate the previously rendered DOM.

React provides us with methods to influence what is going to be rendered during an update as well as to make us aware of when an update happens. These methods allow us to control the transition from the current component's state to the next component's ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

ReactJS by Example - Building Modern Web Applications with React

ReactJS by Example - Building Modern Web Applications with React

Vipul A M, Prathamesh Sonpatki

Publisher Resources

ISBN: 9781786462268Supplemental Content