4 ms·
I would imagine it would help more with nested objects. ({ contact: { address: "" } }) as opposed to ({ ...prev, contact: { ...prev.contact, address: "" } })
by ui4jd73bdj 5y ago
I would imagine it would help more with nested objects.
({ contact: { address: "" } })
as opposed to
({ ...prev, contact: { ...prev.contact, address: "" } })
- zeroonetwothree 5y agoI guess how you should handle that is ambiguous. Probably best to be explicit for that reason.
- loh 5y agoFor deeply nested data, I would probably use `immutability-helper`. Many deep spread operators can get ugly and confusing pretty quickly, in my experience.