I'm using the workbox background sync plugin to handle retrying requests when the network connectivity is patchy. I can't figure out a nice way to notify the redux store when a background sync event succeeds. The workbox plugin gets integrated via webpack at compile time so I can't inject in an action generator method which would be connected to the redux store.
The ideas I have right now are:
Writing a hacky window.dispatchEvent handler connected to the store which would also be accessible to the code in the workbox plugin's onSync handler
Using window.postMessage and having a message listener connected to the redux store
1.4m articles
1.4m replys
5 comments
56.9k users