r/reactjs • u/acemarke • Mar 02 '18
Beginner's Thread / Easy Questions (March 2018)
Last month's thread was pretty busy - almost 200 comments . If you didn't get a response there, please ask again here!
Soo... Got questions about React or anything else in its ecosystem? Stuck making progress on your app? Ask away! We’re a friendly bunch. No question is too simple.
The Reactiflux chat channels on Discord are another great place to ask for help as well.
28
Upvotes
View all comments
Show parent comment
1
u/vidro3 Mar 09 '18
i think you'll be better off using a function to set state instead of passing an object with calculations in the value.
check this out https://medium.freecodecamp.org/functional-setstate-is-the-future-of-react-374f30401b6b