I'm currently developing an application that performs large number of computation os front-end. These computations are part of mapStateToProps function that computes derived data from state.
I would like to compute derived data in WebWorker, but I'm not sure how to implement whole data flow. reselect could help a bit with rendering view for the second time, but it still doesn't solve the problem of blocking the UI during computation.
+1 to pushing the computation into a web-worker; you can author a custom Redux Middleware to intercept an action; read any additional state from the store and then pass that off to your web-worker. When the worker calls back your middleware can dispatch the result.
Bonus points for implementing a cache inside the middleware :)
edit: Here's a gist which follows the same thought process.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With