redux-omt

0.0.2 • Public • Published

Redux O.M.T (Off the Main Thread)

Inspired by Surma's blog post React + Redux + Comlink = Off-main-thread.

This project wraps comlink and immerJS for moving redux off the main thread. Comlink on its own is great for getting into workers, but "by moving Redux to a worker every state change will cause the creation of a new copy due to structured cloning." Which is something we don't want. Surma notes that the solution is 'patching' - instead of sending the entire state, we can just send the changes.

ImmerJS is a library that gives us this functionality almost for free - we just wrap the store (in the worker) so that we can monitor the changes to the state in the reducer and not just get the new object.

Readme

Keywords

none

Package Sidebar

Install

npm i redux-omt

Weekly Downloads

1

Version

0.0.2

License

MIT

Unpacked Size

5.91 kB

Total Files

3

Last publish

Collaborators

  • shlappas