docz: Attempting to use the Props builtin component. It simply just never works.
Bug Report
Describe the bug
Attempting to use the Props builtin component. It simple just never works. There are no errors.
To Reproduce
import Props from docz ( import { Playground, Props } from "docz";
Expected behavior
Should render a <Props of={MyComponent}/>
table.
Right now it just never renders; and there are no errors.
Environment
- OS: OSX 10.14.6 (18G87)
- Node: 12.4.0
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 10
- Comments: 43 (14 by maintainers)
Idk if this helps. But I was experiencing this problem when using it with typescript. Turned out the issue was that I didn’t have a tsconfig file. Once I added that it solved the issue. Is it possible that might work for you as well @robjac? If so then maybe adding that to the documentation would eliminate some of these pain points for others. If not @rakannimer is right. The docz community can provide much more help if you share the smallest reproducible example possible.
Props not showing in my monorepo project. Playground is fine.
i have the same problem,,and I tried the above solutions,but it sames didn’t work
@rakannimer Props not showing in monorepo example. Now v2 can auto get props from d.ts? Because import from package.
tsc --init
, thanks!.tsx
at the end. eg :Sorry you’ve had this frustrating experience ! We did more changes on the Props components that might solve your problem.
Coud you please provide a small repo with a repro of the problem so we can be more helpful in debugging this ?
Have you tried:
or exporting as named export without default and:
@robjac I wasn’t able to reproduce the problem with the code you provided.
Please try reproducing the problem in a repo and provide it here so we can help debug.
^ still not working for me ; however what is interesting is that it works for another one of my components that is set up the same way
docz version :
"docz": "^2.0.0-rc.10",
I agree with you, it should also not need the extension to be added to work.
Adding both to the project todos 👍
One last thing,
Can you try adding the extensions when importing Button in your mdx file ?