Skip to main content
100%

Gist d7dc5ecb9564a880caa4851fd50d6dbe

✓ Published0🌍 Public
Aafbroman
Last edited Feb 10, 2016
Created on May 4, 2016

This example demonstrates the React component lifecycle by logging every phase for both a parent and child component. A parent component manages an input field and passes its text state to a child component, which re-renders with the updated props. The code uses React’s `createClass`, `render`, `setState`, and lifecycle methods such as `componentWillMount`, `componentDidMount`, `componentWillReceiveProps`, `shouldComponentUpdate`, and `componentDidUpdate`. Console output shows the order of lifecycle calls for both components as the user types, clarifying how prop updates trigger child re-renders.

AI-generated description

Similar vizzes