Jake O.’s Post

In reducers and signal updates, I still see a lot of `const next = [...arr]; next[i] = value` for single-index changes. The new `Array.prototype.with()` makes that intent explicit: create a new array with one element replaced, without mutating the original. The trade-off is runtime support and team familiarity, so you may still need polyfills or a clear TS/ES target in shared code. Where would you adopt `with()` first, and where would you avoid it for compatibility reasons? #javascript #typescript #frontend #immutability #redux

  • No alternative text description for this image

To view or add a comment, sign in

Explore content categories