LifeCycle Class — react Architecture
Architecture documentation for the LifeCycle class in ReactIncremental-test.js from the react codebase.
Entity Profile
Dependency Diagram
graph TD 01f9ab96_c9f8_4174_b43a_5d46610df07d["LifeCycle"] e830a60d_4147_3606_7890_6db744e9073f["ReactIncremental-test.js"] 01f9ab96_c9f8_4174_b43a_5d46610df07d -->|defined in| e830a60d_4147_3606_7890_6db744e9073f 0f9e24bc_baa8_98bf_6a12_e452af4dc3a6["UNSAFE_componentWillReceiveProps()"] 01f9ab96_c9f8_4174_b43a_5d46610df07d -->|method| 0f9e24bc_baa8_98bf_6a12_e452af4dc3a6 0462ac3c_bba6_f8d7_7c72_07b164f1c77f["UNSAFE_componentWillMount()"] 01f9ab96_c9f8_4174_b43a_5d46610df07d -->|method| 0462ac3c_bba6_f8d7_7c72_07b164f1c77f 972f7005_de9b_9b1e_aad3_0ac08c8e10a3["componentDidMount()"] 01f9ab96_c9f8_4174_b43a_5d46610df07d -->|method| 972f7005_de9b_9b1e_aad3_0ac08c8e10a3 db7ec514_c69f_6715_5e1d_455f690dbdbf["render()"] 01f9ab96_c9f8_4174_b43a_5d46610df07d -->|method| db7ec514_c69f_6715_5e1d_455f690dbdbf ffc5cf12_fc15_e85f_2997_ba652bcef7e1["constructor()"] 01f9ab96_c9f8_4174_b43a_5d46610df07d -->|method| ffc5cf12_fc15_e85f_2997_ba652bcef7e1 4672a048_5127_6d17_7310_493688715254["shouldComponentUpdate()"] 01f9ab96_c9f8_4174_b43a_5d46610df07d -->|method| 4672a048_5127_6d17_7310_493688715254 f9dfe40f_3d91_281b_3967_325f111a81e0["UNSAFE_componentWillUpdate()"] 01f9ab96_c9f8_4174_b43a_5d46610df07d -->|method| f9dfe40f_3d91_281b_3967_325f111a81e0 29b2bdb8_be57_de2d_4784_a733976ce070["componentDidUpdate()"] 01f9ab96_c9f8_4174_b43a_5d46610df07d -->|method| 29b2bdb8_be57_de2d_4784_a733976ce070 ea9de2f0_7a88_7909_4575_2d2eea232c45["getDerivedStateFromProps()"] 01f9ab96_c9f8_4174_b43a_5d46610df07d -->|method| ea9de2f0_7a88_7909_4575_2d2eea232c45 b5dc423b_7ae6_89ec_7ba1_6258254ee2ad["changeState()"] 01f9ab96_c9f8_4174_b43a_5d46610df07d -->|method| b5dc423b_7ae6_89ec_7ba1_6258254ee2ad ab1837d9_4b1a_26f2_1be8_8d25a737587d["tick()"] 01f9ab96_c9f8_4174_b43a_5d46610df07d -->|method| ab1837d9_4b1a_26f2_1be8_8d25a737587d
Relationship Graph
Source Code
packages/react-reconciler/src/__tests__/ReactIncremental-test.js lines 1173–1192
class LifeCycle extends React.Component {
state = {x: this.props.x};
UNSAFE_componentWillReceiveProps(nextProps) {
Scheduler.log(
'componentWillReceiveProps:' + this.state.x + '-' + nextProps.x,
);
this.setState({x: nextProps.x});
}
UNSAFE_componentWillMount() {
Scheduler.log(
'componentWillMount:' + this.state.x + '-' + this.props.x,
);
}
componentDidMount() {
Scheduler.log('componentDidMount:' + this.state.x + '-' + this.props.x);
}
render() {
return <span />;
}
}
Source
Frequently Asked Questions
What is the LifeCycle class?
LifeCycle is a class in the react codebase, defined in packages/react-reconciler/src/__tests__/ReactIncremental-test.js.
Where is LifeCycle defined?
LifeCycle is defined in packages/react-reconciler/src/__tests__/ReactIncremental-test.js at line 1173.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free