3 ms·
You don't happen to know how to get vuex working idiomatically with deeply nested data do you? I can work with it but only if I start passing around object refe
by beaconstudios 10y ago
You don't happen to know how to get vuex working idiomatically with deeply nested data do you? I can work with it but only if I start passing around object references, which seems like a terrible idea.
- ben_jones 10y agoNo clue, haven't used vuex yet :/ .
- beaconstudios 10y agoah ok, no worries - I think it's similar to Redux largely, which unfortunately includes being severely incompatible with nested state values.
- girvo 10y agoIn redux I use functional lenses to create composoable getter/setter functions to handle deeply nested data safely. I do that even without redux, but it is very useful there. Take a look at the lens functions in Ramda, or safety-lens
- beaconstudios 10y agoI'd never thought to use lenses for this. Thanks for the advice, that actually really helps!