So, I'm trying to use some piece of state from one reducer in another reducer, and I looked for a solution and seems the package reduce-reducers
does exactly that, buth here's my question ...
I have the following rootReducer.js
file where I import all my reducers and combine them with combineReducers
like this ...
import { combineReducers } from "redux";
import globalReducer from "./globalReducer";
import booksReducer from "../features/books/booksReducer";
import categriesReducer from "../features/categories/categoriesReducer";
import authorsReducer from "../features/authors/authorsReducer";
const rootReducer = combineReducers({
global: globalReducer,
books: booksReducer,
categories: categriesReducer,
authors: authorsReducer
});
export default rootReducer;
Now I want to use some state from the authors
reducer in the books reducer, how can I achieve that with reduce-reducers
package?