question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problems with documenting components from separate library

See original GitHub issue

So, the case:

  1. There is a libary on react and typescript
  2. I want to make documentation for it
  3. But, none of the methods for documenting components does not work for some reason I’m getting this error every time
Error when parsing UisButton.tsx
Error: No suitable component definition found.

(i cant use propTypes method, but i tried all the other ones, including getExampleFilename method) 4. Main thing: i’m just reexporting react-component, like this:

import {UisButton} from "uikit";

export default UisButton

If i just inline component source code instead of importing and exporting everything suddenly works. What i am doing wrong? Does anybody got that problem before?

(i think my styleguide.config is fine, other setup is good too, because inlining code works, but i cant inline it, because the library is separate package, and i cant place readmes and proptypes inside it, or basically modify in any way)

Also, your library is just insanely good, thank you so much for all your work, good job! I wish I could collaborate, but I’m not experienced enough just yet!

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
O4epegbcommented, Apr 12, 2016

That might be the case. Is it hard to implement this feature? That would be killer feature, with it you could make docs for independent libraries, without touching any internal source code.

0reactions
sapegincommented, Apr 13, 2016

Feel free to send a pull request with a fix.

Read more comments on GitHub >

github_iconTop Results From Across the Web

4 Ways to Document a React Component Library
Component libraries are the de-facto modern way to reuse UI components. They help ensure UI consistency across teams and standardize development.
Read more >
Use components from component library in solution
When I change one component in the library and update the components in the canvas app output properties of the components are not...
Read more >
Documenting Components. Serve a System's Audiences with…
When a library offers code, engineers are an audience. Obviously. If a library is only code, should doc serve designers too? If doc...
Read more >
The benefits of component libraries and when not to use one
The data is hardcoded, and that's 100% fine. The component library is UI documentation, so it best to keep the data hardcoded (even...
Read more >
Design System documentation best practices - Backlight.dev
One of the pillars of any design system is undoubtedly its documentation, otherwise you would simply end up with a component library, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found