3 ms·
> Reference counting and caching are probably the only areas where immutability can help for most programs. There is another use spurred by React: when you hav
by rakoo 11y ago
> Reference counting and caching are probably the only areas where immutability can help for most programs.
There is another use spurred by React: when you have a new state to represent, you have to diff it against current state to know exactly what changed and work only on this diff. "Immutable" structures make this trivial.