Called immediately after a component is mounted. Setting state here will trigger re-rendering.
Returns void
componentWillUnmount
componentWillUnmount():void
Called immediately before a component is destroyed. Perform any necessary cleanup in this method, such as
cancelled network requests, or cleaning up any DOM elements created in componentDidMount.
Called immediately after a component is mounted. Setting state here will trigger re-rendering.