-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does not work for imported anonymous stateless functional components #11
Comments
Hi @bhargav175 do you think you can add a failing test case and submit a PR? Would be AWE-SOME |
Sure, will give it a shot. On Tue, 8 Dec 2015 at 16:31 Vincent Voyer notifications@github.com wrote:
|
Doesn't work
Works
|
I think there's no way to do what you want: the anonymous function has no function.name so we cannot render it to a string since we do not know the function name. if you Is that clear? Do you have another idea? |
I have reworked the PR, see the master |
What we could do here is turn any anonymous component to render into a string like and then compare them. The comparison will work if you compare anonymous component. What do you think? |
Will it work? Like you said, I dont see any property of that we could use to figure out the name. |
Also @bhargav175 I would advise you to always use named components because when you use react-dev-tool you will have the same issue as this module. I will update it to make it work because it's an easy fix but please use named components |
Yes |
Sure. Thanks @vvo . |
https://facebook.github.io/react/blog/2015/10/07/react-v0.14.html
For components created using pure functions, the response is 'function(props) ....'.
The text was updated successfully, but these errors were encountered: