Subcomponents don't show parent component
jxnblk opened this issue · 3 comments
I have a Dropdown
component with a Dropdown.Item
subcomponent (e.g. Dropdown.Item = React.createClass()
). react-to-jsx will only return Item
in the string.
I'm not sure if it's possible to get the parent component from displayName
, but it would be helpful for using this to show documentation with live examples.
Sorry, completely missed this PR (also, thanks for checking this out! Really like your work).
I'll look into this and see what I can do.
I looked into this a bit but I think I'm going to leave it alone unless the JSX compiler starts exposing parent component names somehow. In the meantime I would set displayName
manually and include the namespace, if you can:
displayName: "Dropdown.Item"
Rad. Thanks for taking a look into this. Seems like manually setting displayName
isn't a bad way to go. Keep up the good work!