|
|
|
|
|
by mlajtos
1654 days ago
|
|
In JavaScript world, there is ImmutableJS, which uses this style of updates. However, there is better approach which is what ImmerJS uses – you write a function where you can do mutation to the target data structure, wrap it in a "produce" function, and library will pick on those mutations and create a new copy of the data that is structurally shared with the original. https://immerjs.github.io/immer/ |
|