Docz: Props components not working with default exports in 1.0.0-rc.3

Created on 25 Mar 2019  Â·  9Comments  Â·  Source: doczjs/docz

The Props component doesn't display anything :(
It's working in the docz basic example but not with an external fresh new install from npm.

Repo with the example
https://github.com/ivan-dalmet/docz-issue-sandbox/tree/master/issue-717

Docz: 1.0.0-rc.3
Node: 10.13.0
Yarn: 1.15.2

v1

Most helpful comment

Fixed, will be released in the next version ✅

All 9 comments

Just add a working example in the repo... but no idea why it works 😢

If someone has a clue...

Found why... it doesn't work with default exports 😢

@pedronauck any idea why?

Hi @ivan-dalmet, I'm digging into this today to see what's happening. I have an idea I think.

@ivan-dalmet @pedronauck Problem is in babel-plugin-export-metadata. It doesn't add __filemeta in case of export default. I've fixed babel-plugin-export-metadata but I need to fix some other things. I think I'll finish tommorow

Useful links in case you're working on this issue:
https://astexplorer.net/#/gist/e170740e4f6615c436e1114f88cb7989/e94dfd5a288662d4c164b14530e8addbf646973b
http://www.mattzeunert.com/babel-plugin-playground/

FWIW I'm having issues in rc7 with Props not rendering anything at all while _not_ using default exports with TypeScript enabled.

image

Component looks something like:

export const MyComponent: React.FunctionComponent<Props> = (props) => {
  return (
    // ...
  )
}

Using a class component also doesn't help.

I have the same issue

I have the same issue too

Fixed, will be released in the next version ✅

Was this page helpful?
0 / 5 - 0 ratings