Giter Club home page Giter Club logo

Comments (8)

ptomasroos avatar ptomasroos commented on July 21, 2024

I think is not the way to go since you retrieve a snapshot from the server. A Get req gives you a snapshot image.

And rebuild state then should be done with closer to the snapshot than try to run through a chain of effects IMHO. It will be very hard in the local what is event handler vs what shall execute business logic ect.

Plus as you said the overhead will be big for the sake of none.
When the ui has rendered all the event handling should be up as soon as possible.

from dispatchr.

stanshillis avatar stanshillis commented on July 21, 2024

Rehydrtaion of stores through replay will bring it much closer to event sourcing ideas. We are currently experimenting with replay and it works well. There are only a handful of events being replayed so performence has not been an issue. It would definitely be great to see support for that directly in the library.

from dispatchr.

mridgway avatar mridgway commented on July 21, 2024

Yeah, I think it depends on the application, so it could be a configuration option. The implementation should be fairly simple. I'm totally willing to add this in if someone wants to do a PR.

from dispatchr.

ptomasroos avatar ptomasroos commented on July 21, 2024

If the dehydrate / rehydrate methods won't go away what's the purpose ?

The goal was to reduce code right so in that case I would say there should be a single way to do the state mgmt on client side init.

But hey I'm a purist and like simplicity.

On 17 Feb 2015, at 23:06, Michael Ridgway [email protected] wrote:

Yeah, I think it depends on the application, so it could be a configuration option. The implementation should be fairly simple. I'm totally willing to add this in if someone wants to do a PR.


Reply to this email directly or view it on GitHub.

from dispatchr.

mridgway avatar mridgway commented on July 21, 2024

The need for each store to define dehydrate/rehydrate would go away. With replay, it would just re-dispatch the events on the client.

from dispatchr.

ptomasroos avatar ptomasroos commented on July 21, 2024

Right, It felt like you wanted both. I could def see the benefit by having a self solving rehydration.

from dispatchr.

3den avatar 3den commented on July 21, 2024

Could we add an standard dehydrate / rehydrate to the BaseStore? Those methods could just set/get this.state which is what is done in most cases.

from dispatchr.

ptomasroos avatar ptomasroos commented on July 21, 2024

Elegant idea. Either that or a mixin would work.

from dispatchr.

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.