Skip to content

[atom] Why is there no method getIn? #487

Discussion options

You must be logged in to vote

Hi @bit-app-3000 — apologies I forgot to respond to this, in case you're still needing an answer: The deep accessor functionality like getIn, setIn, updateIn was alwyas meant to be kept a separate feature (so it can also be used with other data structures, incl. vanilla JS objects) and therefore is available as separate package: thi.ng/paths. In my experience I found updating nested values in an atom is much more common than reading nested values directly. For the latter it's much more common to have (reactive) views or cursors defined, and so atoms only provide nested-value update functions like resetIn, updateIn, but not nested readonly accessors like getIn... so far no one else has bro…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by bit-app-3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants