'How to share redux store with other library
So we are starting to split our React front end project in multiple repos cause it's getting big. We have three main sections: reports, feed, and graphs.
We want to start with the reports section.
The reports section is a folder with an index. In the index there are multiple routes for the different reports. Inside theres a components folder with multiple files, each one corresponding to a report.
Inside each report there is code like this:
const user = useSelector(getLoggedUser);
That getLoggedUser is a redux selector that takes the user from the main app store. If we move the reports section into another repo. How can we access this data?
I guess if the component is inside the redux provider, the selector will work as long as it's defined in the reports project. But maybe there's a better way of handling all these async stuff in multiple projects.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
