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

ArgsTable: Errors on TS components whose names are keywords #13301

Closed
aricma opened this issue Nov 26, 2020 · 7 comments
Closed

ArgsTable: Errors on TS components whose names are keywords #13301

aricma opened this issue Nov 26, 2020 · 7 comments

Comments

@aricma
Copy link

aricma commented Nov 26, 2020

Bug or support request summary

I wrote a functional component with the function name "Switch". The storybook was strating and loading for ever. There was no indicator that somthing went wrong.
As I opened the console I saw an error leading me to fixing the name of my component into something other than switch.

I am not sure if this is an edge case but if this error would have lead the storybook to crash or there would have been a message in the view, my search wouldn't have taken so long.

Steps to reproduce

  • write a story for a functional component with the name "Switch".
  • start the storybook

Please specify which version of Storybook and optionally any affected addons that you're running

  • @storybook/react 6.1.2
  • @storybook/addon-* 6.1.2

Affected platforms

  • macOs 11.0.1
  • firefox developer edition 84.0b4

Screenshots / Screencast / Code Snippets (Optional)

Screenshot 2020-11-26 at 8 45 25 PM

const Switch: FunctionComponent<Switch> = (props) => {
    return (
        <Wrapper>
             <Knob>
        </Wrapper>
    );
};
@shilman
Copy link
Member

shilman commented Nov 27, 2020

Do you have a repro repo you can share?

@shilman shilman reopened this Nov 27, 2020
@shilman shilman added the PN label Nov 27, 2020
@aricma
Copy link
Author

aricma commented Nov 27, 2020

Do you have a repro repo you can share?

I will create one

@aricma
Copy link
Author

aricma commented Nov 29, 2020

@shilman shilman assigned shilman and unassigned shilman Dec 1, 2020
@shilman
Copy link
Member

shilman commented Dec 1, 2020

@hipstersmoothie Mind taking a quick look?

Storybook

@shilman shilman changed the title error was not catched ArgsTable: React-docgen-typescript fails on components whose names match JS keywords Dec 1, 2020
@shilman shilman changed the title ArgsTable: React-docgen-typescript fails on components whose names match JS keywords ArgsTable: Errors on TS components whose names are keywords Dec 1, 2020
@hipstersmoothie
Copy link
Contributor

Seeing if we can get a fix in styleguidist/react-docgen-typescript#313

@stale
Copy link

stale bot commented Dec 25, 2020

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. Unfortunately, we don't have time to get to every issue. We are always open to contributions so please send us a pull request if you would like to help. Inactive issues will be closed after 30 days. Thanks!

@shilman
Copy link
Member

shilman commented Feb 21, 2021

closing as dupe to #11980

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants