component mounted react code example
Example 1: react.component
class Welcome extends React.Component {
render() {
return <h1>Hello, {this.props.name}</h1>;
}
}
Example 2: component did mmount
componentDidUpdate(prevProps, prevState, snapshot)