setState
can accept a function rather than an objectthis.setState((prevState, props) => ({
counter: prevState.counter + props.increment
}));
Introduce I have been working with React/Redux since Oct., 2015 at Dataminr in production. Along this journey, there are some takeawayes I gained and would like to share. Hopefully it will help you...