I have create separate slice for entity adapters that I have inside of /redux/slices/messagesSlice.ts. When I try to access store from inside of that file it appears as undefined.
I need to access state (store.getState()) inside of my chatSelector.
On redux website they have all the code reducers and configurestore in one file.
My question is:
Do I need to import store into every component that wants to use selector.selectAll(store.getState()) ??
A had the same question, and I find this post.
After some time and research, I realize something:
In the documentation in the blue note on the top is written:
So for me below worked fine.