Open gaearon opened 6 years ago
We get a lot of feedback that getDerivedStateFromProps is used for memoization which is not very ergonomic.
Let’s add a recipe about memoizing directly to the docs.
https://twitter.com/brian_d_vaughn/status/987443099537309696?s=20
We should probably use this package:
https://www.npmjs.com/package/memoize-one
It’s important to highlight that we usually recommend memoizing just the last value.
@gaearon Can I take this?
We get a lot of feedback that getDerivedStateFromProps is used for memoization which is not very ergonomic.
Let’s add a recipe about memoizing directly to the docs.
https://twitter.com/brian_d_vaughn/status/987443099537309696?s=20
We should probably use this package:
https://www.npmjs.com/package/memoize-one
It’s important to highlight that we usually recommend memoizing just the last value.