Sorry for the delay, I took a small hiatus after writing this.
Originally, in our app, we used plain old redux. It was a mess.
Then, on every screen, we asked ourselves:
Does this REALLY NEED to be in redux for global state?
The answer, 95% of the time, was no. We refactored out redux and went with Context for truly global state (App state, user state, etc...).
But, to answer your question in 2020 of how I would do it (managing actions / reducers):
For actions / reducers
Use Redux Toolkit or something similar (redux-toolkit.js.org/). Creating all those actions and reducers and managing them was a nightmare.
For shared behavior
Hooks are exactly what that was made for. Got a bug service? useBugs() might return { createBug, searchBugs }. Import and use anywhere.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Sorry for the delay, I took a small hiatus after writing this.
Originally, in our app, we used plain old redux. It was a mess.
Then, on every screen, we asked ourselves:
Does this REALLY NEED to be in redux for global state?
The answer, 95% of the time, was no. We refactored out redux and went with Context for truly global state (App state, user state, etc...).
But, to answer your question in 2020 of how I would do it (managing actions / reducers):
For actions / reducers
Use Redux Toolkit or something similar (redux-toolkit.js.org/). Creating all those actions and reducers and managing them was a nightmare.
For shared behavior
Hooks are exactly what that was made for. Got a bug service? useBugs() might return { createBug, searchBugs }. Import and use anywhere.