Monday, 5 August 2019

React: Key learning touch points

React itself is a powerful framework including a number of key techniques:
Redux:
  • Saga's versus thunks... or both?
  • Global versus local state... are you over-using redux?
Other learning:
  • Remember that setState() can also take a function as a parameter:
  • this.setState((prevState, props) => ({ ...prevState, answer}));
  • setState() is asynchronous, if you call it in the component you cannot guarantee that local state has been updated immediately

No comments:

Post a Comment