Skip to content
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

Export + Export Default + React Hooks #46

Closed
hipstersmoothie opened this issue Oct 31, 2018 · 4 comments
Closed

Export + Export Default + React Hooks #46

hipstersmoothie opened this issue Oct 31, 2018 · 4 comments

Comments

@hipstersmoothie
Copy link
Contributor

Hi, Thanks for the awesome plugin.

Currently I am using typescript + docgen to get a prop table for my components. To do this I have to export my component as default export + non default:

export function Component() {}
export default Component;

when I add export function Component() {} i get the following error from react 16.7.0-alpha

screen shot 2018-10-31 at 11 20 29 am

@hipstersmoothie
Copy link
Contributor Author

hipstersmoothie commented Nov 1, 2018

i'm encountering a bug where the above config makes the jsx rendering wrong. This componetn uses no hooks

screen shot 2018-10-31 at 11 35 33 pm

screen shot 2018-10-31 at 11 35 43 pm

@hipstersmoothie
Copy link
Contributor Author

hipstersmoothie commented Nov 1, 2018

More on Hooks: I had a wrapper component in a decorator which i moved to the addWithJSX fn and the error doesnt throw now. Problem is i cant get the wrapper to not render in the jsx preview

@vipcxj
Copy link

vipcxj commented Apr 12, 2019

Why closed it? I met the same issure, too.

@hipstersmoothie
Copy link
Contributor Author

hooks issue tracking in #84

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

No branches or pull requests

2 participants