react the render component in every component code example
Example 1: component did mmount
componentDidMount()
Example 2: react.component
class Welcome extends React.Component {
render() {
return <h1>Hello, {this.props.name}</h1>;
}
}
componentDidMount()
class Welcome extends React.Component {
render() {
return <h1>Hello, {this.props.name}</h1>;
}
}