|
|
|
|
|
by konradb
2389 days ago
|
|
Genuinely asking as I've had to tackle modification of large deeply nested immutable objects in JS. Because of the large and varied object, I used a generic approach of set/get functions that could take paths using https://github.com/mariocasciaro/object-path-immutable Use of this lens pattern as given in the article seems to lead to a lot more boilerplate with lenses that have knowledge of object structure, which doesn't seem optimal. So I must be missing what this specific+compositional approach gives over using something like object-path-immutable. Perhaps they are two approaches for two different situations? |
|