You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 9, 2020. It is now read-only.
I investigated and learned that findDisplayName takes the name in case it's a class node and has an ID or leverages the arguments from createClass. I couldn't figure out how to get the properties from a class node. Any hint? I'm happy to submit a PR.
The text was updated successfully, but these errors were encountered:
if someone wants to submit a PR it should be something like this:
out of all the paths of the body of the class declaration find one (if any) that satisfies path.isClassProperty(), and is static path.node.static, and is called displayName path.node.key == 'displayName'. Its path.node.value should then be the displayName
This probably doesn't work exactly like this but it should get you some of the way there.
(look here for inspiration https://github.com/babel/babel/blob/master/packages/babel-plugin-transform-class-properties/src/index.js#L33)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
While upgrading to react-transform I noticed in case displayName is defined as a class property the name is not taken into account e.g.
Here out in the wild: https://github.com/nikgraf/belle/blob/75aa7dad0a2ba03ad755a97efe3193bdcf76b3a3/src/components/Card.jsx#L27
For Belle we will migrate the display names, but others might run into the same issue.
I investigated and learned that findDisplayName takes the name in case it's a class node and has an ID or leverages the arguments from createClass. I couldn't figure out how to get the properties from a class node. Any hint? I'm happy to submit a PR.
The text was updated successfully, but these errors were encountered: