React
Last updated
Was this helpful?
Last updated
Was this helpful?
Presentational just have props -> functional component/stateless component Container pass state + props -> Presentational
Pass func to setState
Avoid to setState in constructor with props Should call setState in componentDidMount Don't mutating state without setState. Whenever setState gets called in the future, the mutated state gets applied
Don't use index as key
Using batch
for multi action to reduce re-render