Open micahgodbolt opened 3 years ago
Immer is a much cleaner way to resolve mutating state, and will be a good polyfill until structuredClone is available in browsers https://github.com/whatwg/html/commit/1b5099fcf55cc6332fb9af5d36ac4db47749438b
structuredClone
possibly show both examples in case someone doesn't want to use that dependency
even better, add immer to our reducer https://immerjs.github.io/immer/example-setstate#useimmerreducer
Immer is a much cleaner way to resolve mutating state, and will be a good polyfill until
structuredClone
is available in browsers https://github.com/whatwg/html/commit/1b5099fcf55cc6332fb9af5d36ac4db47749438b