React Redux showing "e is not a function"!


I was about to complete the Drum Machine project, but an unexpected error was thrown while working.

I created the project with React + Redux, and after everything was done, unfortunately, the components did not render. I checked the console for errors and I saw this:

Here e represents the event object, which I use for my event handlers. I don’t know why it is not a function.

I checked my code for errors and I believe there are none. Can someone tell me what I did wrong? Or is this a problem with CodePen?


Lines 187-188: You shouldn’t call those methods:

  const selectState = ReactRedux.useSelector();
  const dispatch = ReactRedux.useDispatch();
1 Like

Thank you very much @jenovs. It sorted out the error.

Any other errors in my code? I noticed that the volume slider, change bank toggle and display box doesn’t work and the music takes too much time to play.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.