D
D
Dmitry2019-03-18 18:44:41
React
Dmitry, 2019-03-18 18:44:41

Why doesn't dispatch work?

Hello. I'm learning react.js using a simple example in conjunction with redux
Link to the sandbox
When I click on the All or Part filter in the console, an error occurs

Uncaught TypeError: (0 , filter.default) is not a function

Where is the mistake?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Spirin, 2019-03-18
@ddimonn8080

There is no default export in 'actions/filter.js' file.
You can fix it like this:
import { setFilter } from "../actions/filter";

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question