I want to update an js object using a value and path like we do with lodash.set, but the problem with lodash.set is that it keeps all the referennces of the objects in the path the same, example, profile:{addres:{street:'test'}}, let's say I want to update the value of street, and I want to clone the objects in the path, like profile, address and street, and keeps all other objects without any change, (for react re-rendering purpose), is there any way to do that simply?
via challenger
No comments:
Post a Comment