I just started playing around with web-workers with my vue application. I have it setup and working in a normal setup(listen and broadcast). Now, I want to experiment integrating it with Vuex.
My question is: is there a way I can integrate my web worker with vuex. What I mean by integrate is that I can access store variables directly inside web-worker.
I saw many examples of people integrating it with redux but none with vuex.
This is my workflow:
I have a pub/sub service that pushes live position data every second. I need to process this telemetry data in the web worker, parse it and update the store and do some DOM manipulation. I want this to be done on web-worker for performance optimization.
Change current workflow from:
Pub/Sub -> calls store action -> parse/process -> update store -> update DOM(map, display live data)
TO:
Pub/Sub -> web-worker -> parse/process -> update store -> update DOM(map, display live data)