Hey Jeremy, thanks! I don’t have a specific answer for you, but I can tell you that epics actually take the store as their second parameter, so where I’m passing
null in this example https://gist.github.com/kevinsalter/b7d617a273cc9105b25c37dda701b186#file-savefieldepic-v2-js-L14, you could use a variable there, possibly called
store, and then access the store via
store.getState(). It makes things impure, but I’ve encountered a couple scenarios so far where I’ve needed to use that to access or format the store’s data in a certain way.
Also, epics run after your reducer(s), so you don’t have to worry about that! Here’s an excerpt from the redux-observable docs:
Epics run alongside the normal Redux dispatch channel, after the reducers have already received them.
This info and more can be found at https://redux-observable.js.org/docs/basics/Epics.html. Good luck! 🚀