DEV Community

Understanding states in ReactJS

Alan Montgomery on January 30, 2019

Hi there - this is my first post and it's aimed at beginners to get an insight into the states in components. In ReactJS it's very useful to use t...
Collapse
 
dance2die profile image
Sung M. Kim • Edited

Thanks for the post Alan, it was easy to digest 🙂

For code snippets, you can wrap'em using triple backticks around the code for syntax highlighting.

demo

Code 👆 will show code like 👇

componentWillReceiveProps(NewProps) {
  var MyBool = NewProps.ManipulativeBool;
  this.setState({ Manipulated: MyBool });
}
Collapse
 
93alan profile image
Alan Montgomery • Edited

Thank you so much - Really loving this community. It's awesome.

Ah that makes life a lot easier haha. I'll edit my post to reflect this now as well and remember for the future 😄

Collapse
 
dance2die profile image
Sung M. Kim

You're welcome & thank you for updating the post~

And.. 👋 Welcome to dev.to, Alan 🙂