Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

JavaScript Building Applications with React and Redux Putting it all Together Updating the Player, Counter and AddPlayerForm Components

Uncaught Error: bindActionCreators expected an object or a function

Hey everybody! I was following along with Guil when updating the code but got this error:

Uncaught Error: bindActionCreators expected an object or a function, instead received undefined. Did you write "import ActionCreators from" instead of "import * as ActionCreators from"?

I have the same code Guil has :

import * as PlayerActionCreators from '../actions/player';

Have no I idea how to fix that... hope anybody can help me!)

hope you got this resolved, but the issue is actually probably syntax in both code, make sure your code is actually referencing something NOT undefined.

Triple check the reference names and the code.

console logs will save a life when you're trying to pinpoint the error :D

the error is correct it's bascially say i could not find any reference! and it should be of the following type.

Feel free to message me the code and I'll take a look and see if i can help you along the way, or post it here and i'll get back to you :) so it can help other people xD

Philip Putnam
Philip Putnam
2,380 Points

I had this exact same error, I found my typo in the 'actions' folder's player.js file, one of the exported functions was misspelled or mislabeled. Hopefully you've found a solution to this but if you can backtrack each file that has anything to do with

import * as PlayerActionTypes from '../actiontypes/player'; or import * as PlayerActionCreators from '../actions/player';

at all... then that's a good start. I suggest downloading the project files for this and comparing!

1 Answer

I do got this issue. i haven't resolved it as yet. i have checked all my spelling etc