Functional Component must return some amount of JSX object.
Class based components is mainly for dynamic sources of data.
Class Component has a life-cycle methods, function that placed on out class that will be automatically called at some point.
组件生命周期arrow-up-right
React.Component - Reactarrow-up-right
We can define a method on the class
componentWillMount()
componentDidMount()
componentWillReceiveProps
shouldComponentUpdate
componentWillUpdate
componentDidUpdate
componentWillUnmount
Last updated 6 years ago
Was this helpful?