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

PropTable template from Readme not working #3

Closed
lukasbach opened this issue Jun 20, 2021 · 1 comment
Closed

PropTable template from Readme not working #3

lukasbach opened this issue Jun 20, 2021 · 1 comment

Comments

@lukasbach
Copy link
Contributor

Hi, awesome project :)

I've tried to use the template for the PropTable component from the readme, but encountered an issue: Because useDynamicImport returns null on the first render, and only seems to provide the props in the next render, the component crashes the React app. Adding

  if (!props) {
    return null;
  }

after the useDynamicImport call works. Maybe the readme should be updated or it should be mentioned that useDynamicImport may return null at the start :)

lukasbach added a commit to lukasbach/docusaurus-plugin-react-docgen-typescript that referenced this issue Jun 20, 2021
@atomicpages
Copy link
Owner

Nice catch, thanks for the contrib 🚀

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