Redux and Web Workers on the Frontend
summary
A small library called Redux worker moves reducers into a Web Worker so heavy state computation runs off the main thread and the UI stays near 60 frames per second. Implementation exposes two functions create worker and apply worker, uses webpack to emit a worker bundle, and relies on reducers being pure. Demo runs an n Queens solver in the worker, the UI stops blocking, and the approach demonstrably works.
AI-written summary · about
chapters (5)
related talks
36mMultithreading in React: A guide to Web Workers
19mLet the Main Thread Breathe!
13mHow to Use Web Workers for Fun and Profit
31mLet the Main Thread Breathe!
36mMulti-thread demystified
34mParallel computing in React
30mBuild Snappier Apps with React and Web Workers
29mParallel computing in ReactJS: Provide a pleasant user experience
