Giter VIP home page Giter VIP logo

Comments (7)

staltz avatar staltz commented on June 8, 2024

I think problem 1 can be solved with something like this: #3
It also depends if Child and AnotherChild just read state but don't write it. If that's the case, then state$ can be passed instead of sources.onion.

Problem 2:
It depends, if it's read-only state, we can do like I suggested above. Otherwise, we could consider supporting an API like isolate(Child, 'some.nested.child')

from cycle-onionify.

wclr avatar wclr commented on June 8, 2024

'some.nested.child' it is still imperfect solution, as object property itself may contain dot.

I like that onionify tries to unify ideas for managing state, though currently I prefer more transparent and custom solution, something that I described in recent gist: https://gist.github.com/whitecolor/0f015856a335ca418e22d4bba4d97d68

from cycle-onionify.

staltz avatar staltz commented on June 8, 2024

as object property itself may contain dot

I've never seen a single case of this. :)

from cycle-onionify.

davidskuza avatar davidskuza commented on June 8, 2024

What about obj['some.dots']?

from cycle-onionify.

jakelazaroff avatar jakelazaroff commented on June 8, 2024

I've also seen arrays of strings/numbers used to denote a nested path, as in isolate(Child, ['some', 'nested', 'child']). It's a little noisier than a dot-delimited string but it works if you're really worried about having dots in property names.

from cycle-onionify.

staltz avatar staltz commented on June 8, 2024

The lenses proposal in #11 would solve this issue entirely.

from cycle-onionify.

staltz avatar staltz commented on June 8, 2024

Solved by issue #11

from cycle-onionify.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.