Create the next immutable state by mutating the current one
And from an ergonomics perspective, immer which lets you do immutable updates via a mutation-based API is way nicer.
I can't speak to C# and Java, but the suggestion in this post: ImmutableJS already uses Persistent data structures. (It's the second sentence of their introduction)
Appwrite - The open-source backend cloud platform. Add Auth, Databases, Functions, and Storage to your product and build any application at any scale while using your preferred coding languages and tools.
How We Fixed Performance With JS Object Variable Mutation
1 project | dev.to | 4 Sep 2023
Why my variable is being mutated if I make any changes to my data ?
1 project | /r/reactjs | 29 Jun 2023
1 project | dev.to | 1 May 2023
Pure functional data in Clean Architecture
1 project | /r/functionalprogramming | 28 Apr 2023
Immer 10.0: faster update perf, smaller bundle size, modern modules!