Tuesday, 31 January 2017

How you will update a Component's state?

We update state by calling this.setState(), this causes our component to re-render.

this.setState({showComments:true})
Will only update the properties an argument, not replace the entire state object.
How is state available, and what is it by default?
this.state == null

WHAT OTHERS ARE READING/RELATED TO THIS:

0 comments:

Post a Comment

Find job here...