We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrated from don't! Originally created by @piyaleemaiti on Fri, 08 May 2020 05:29:24 GMT
const original = { x: { y: null}} setIn(original, ['x', 'y', 'z'], 456)
Here the old value was set to null, but I wanted to insert object value replace of null, how can I do that?
The text was updated successfully, but these errors were encountered:
Migrated from don't reference! Original comment by @piyaleemaiti on Sat, 15 Aug 2020 14:08:51 GMT
Thanks @Methuselah96, I will try your suggestion.
Sorry, something went wrong.
Migrated from don't reference! Original comment by @bdurrer on Mon, 22 Jun 2020 11:15:02 GMT
Please use stackoverflow for questions. The issues on github are meant for bug/improvment reports.
PS: You likely forgot to assing the returned new collection: notOriginalAnymore = setIn(original, ['x', 'y', 'z'], 456)
notOriginalAnymore = setIn(original, ['x', 'y', 'z'], 456)
Migrated from don't reference! Original comment by @Methuselah96 on Fri, 14 Aug 2020 20:19:42 GMT
@piyaleemaiti I think the only way to do what you're asking is to provide the object value you want to replace null with like this:
null
const original = { x: { y: null}} const result = setIn(original, ['x', 'y'], { z: 456 })
No branches or pull requests
Migrated from don't!
Originally created by @piyaleemaiti on Fri, 08 May 2020 05:29:24 GMT
What happened
Here the old value was set to null, but I wanted to insert object value replace of null, how can I do that?
The text was updated successfully, but these errors were encountered: