immer
immer copied to clipboard
Create the next immutable state by mutating the current one
## π Bug Report An error occurs when nesting patches and changing the level of [tree structure data] ## Link to repro [https://codesandbox.io/s/minimal-repro-forked-xvb93p](url) ## To Reproduce 1.remove a node 2.Add...
I suppose there is a bug in setter about βNaNβ special case.
add [immer-yjs](https://github.com/sep2/immer-yjs). [y.js](https://github.com/yjs/yjs) is a CRDT library with mutation-based API. [immer-yjs](https://github.com/sep2/immer-yjs) allows manipulating `y.js` data types with the api provided by `immer`. * Two-way binding between y.js and plain (nested)...
## πββ Question Consider the following code: https://codesandbox.io/s/immer-sandbox-forked-t7ghd9?file=/src/index.ts While `patchedState` is indeed deep equal to `producedState`, there is a difference in that `produce` preserves object identity, but `applyPatches` does not....
Bumps [url-parse](https://github.com/unshiftio/url-parse) from 1.5.3 to 1.5.10. Commits 8cd4c6c 1.5.10 ce7a01f [fix] Improve handling of empty port 0071490 [doc] Update JSDoc comment a7044e3 [minor] Use more descriptive variable name d547792 [security]...
Bumps [prismjs](https://github.com/PrismJS/prism) from 1.25.0 to 1.27.0. Release notes Sourced from prismjs's releases. v1.27.0 Release 1.27.0 v1.26.0 Release 1.26.0 Changelog Sourced from prismjs's changelog. 1.27.0 (2022-02-17) New components UO Razor Script...
Minor typo fix for a produce function overload
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.14.5 to 1.14.8. Commits 3d81dc3 Release version 1.14.8 of the npm package. 62e546a Drop confidential headers across schemes. 2ede36d Release version 1.14.7 of the npm package. 8b347cb...
const state0 = {a: []}; const state1 = applyPatches(state0, [{op: "add", path: ["a","-"], value: 1}]); const state2 = applyPatches(state1, [{op: "add", path: ["a","-"], value: 2}]); const state3 = applyPatches(state2, [{op:...
## πββ Question Hey folks. I'm using Immer with React and I want to create a custom produce function that does something with the new state. I want to pass...