-
Notifications
You must be signed in to change notification settings - Fork 597
New issue
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
Batched updates #81
Comments
Ooh, yeah I've been considering this; combined with documenting best practices on thunking views and caching routes (yoshuawuyts/sheet-router#17) it would def be worthwhile to put an upper cap on flushing updates. In the past for I think this should happen after the |
Created https://github.com/yoshuawuyts/nanoraf yest; might add this. Talked about this on IRC, and considered not doing batched updates; but realized yesterday that sometimes something like a higher order effect might trigger a whole slew of updates in rapid succession because stores are separated - there'd be no way of throttling that so we should prob def do this. If not today, then soon ✨ |
Created a new branch: https://github.com/yoshuawuyts/choo/tree/raf which uses This won't be part of Anway, it can be played with now; keen to hear your thoughts on it. |
@yoshuawuyts I haven't given it an actual test drive, but from a read of the code the approach looks great to me! I have a couple of thoughts but I'll post them as issues over in nanoraf. |
This was merged in |
Depending on the store/action design of an app, batching updates can be a pretty useful/important perf optimization. @yoshuawuyts what are you thoughts on the best
choo
-like way to handle this? Would you be interested in adding a hook that would make this possible in some app-wide way (like maybe a way to provide 'middleware' function through which updated states were passed before being emitted to the view-rendering)? Or would you prefer for people to handle this by simply throttling individual view functions?The text was updated successfully, but these errors were encountered: