grommet / jsx-to-string

Parse your React JSX component to string
MIT License
124 stars 26 forks source link

add support for forwardRef function naming #45

Open townofdon opened 4 years ago

townofdon commented 4 years ago

Awesome package! I found an edge case where components wrapped with forwardRef were not displaying correctly. I tested and the following change fixes this issue, at least for named functions.

https://reactjs.org/docs/forwarding-refs.html#displaying-a-custom-name-in-devtools