I have some axios interceptor written that in some circumstances should dispatch an action from core store.
I tried exporting a store object and importing it into the file, but that does not call the inner function.
How can you achieve this behaviour?
I've made a simple reproduction, what is not working. https://codesandbox.io/s/cool-pine-pwepc?file=/src/App.js
When clicking on the "normal on click" the counter is incremented. I don't know however how can I make it work the same way for "outside fn click"