L
L
Leonid Shishkin2019-05-02 18:51:34
React
Leonid Shishkin, 2019-05-02 18:51:34

Why doesn't combineReducer work?

When using conbineReduser, the application does not receive data from the store. Without conbineReduser everything worked fine. Here is the link to the sandbox https://codesandbox.io/s/qx3w4nq5r6

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Spirin, 2019-05-02
@leonidshishkin

1. You are exporting the reducer function from search-reducer and trying to import it as search. In a good way, export the default value:
and import: 2. Please note that the structure of your repository will change and the application will need to be modified accordingly. 3. In a reducer, in a good way, pass the initial state:

const initialState = {
  value: "",
  works: [],
};

export default function search(state = initialState, action) {

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question