react-memoize icon indicating copy to clipboard operation
react-memoize copied to clipboard

Use componentDidUpdate instead of getDerivedStateFromProps

Open theKashey opened this issue 7 years ago • 0 comments

Use componentDidUpdate instead of getDerivedStateFromProps to run side-effects?

Currently, one could use selector/flow-step with side-effect, and have to defer any state change he could execute inside, leading to 2 problems.

  1. memoize-state does not properly work with async stuff, concreting usage just after a function call.
  2. Possible double rendering.

theKashey avatar Apr 15 '18 13:04 theKashey