Skip to content

Conversation

@jasonblanchard
Copy link
Contributor

The find middleware is using the name property on the component class passed in as an argument which was causing an issue with components created with React.createClass that don't have the name attribute. I fixed this by falling back to displayName in this case.

Although using createClass is not the recommended way to create React components, some third-party libraries still use it, so I think the find middleware should support it until it's officially deprecated in React.

@zackify
Copy link
Member

zackify commented Nov 2, 2015

Thanks for this! :)

zackify added a commit that referenced this pull request Nov 2, 2015
Fixed find middleware when selector is a component created with createClass
@zackify zackify merged commit f610d66 into Legitcode:master Nov 2, 2015
@zackify
Copy link
Member

zackify commented Nov 2, 2015

@jasonblanchard
Copy link
Contributor Author

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants