Describe the bug
Upgrading @storybook/addon-docs from 5.3.0-alpha.33 to 5.3.0-alpha.39 gives the error:
Cannot read property 'props' of undefined
when using <Props of={ SomeComponent } />.
To Reproduce
Upgrade @storybook/addon-docs from 5.3.0-alpha.33 to 5.3.0-alpha.39.
Expected behavior
Props table should be shown.
Code snippets
some-component.mdx
import { Meta, Story, Preview, Props } from '@storybook/addon-docs/blocks';
import { withKnobs, text } from '@storybook/addon-knobs';
import SomeComponent from './index';
<Meta title="SomeComponent" component={ SomeComponent } />
<Preview withToolbar>
<Story name="Default" parameters={ { decorators: [ withKnobs ] } }>
<SomeComponent text={ text( 'Text', 'Lorem Ipsum' ) }/>
</Story>
</Preview>
<Props of={ SomeComponent } />
System:
System:
OS: macOS Mojave 10.14.6
CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
Binaries:
Node: 12.10.0 - /usr/local/bin/node
Yarn: 1.19.0 - /usr/local/bin/yarn
npm: 6.12.1 - /usr/local/bin/npm
Browsers:
Safari: 13.0.3
npmPackages:
@storybook/addon-docs: ^5.3.0-alpha.39 => 5.3.0-alpha.39
@storybook/addon-knobs: ^5.3.0-alpha.39 => 5.3.0-alpha.39
@storybook/react: ^5.3.0-alpha.39 => 5.3.0-alpha.39
Whoopee!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.3.0-alpha.41 containing PR #8731 that references this issue. Upgrade today to try it out!
You can find this prerelease on the @next NPM tag.
Closing this issue. Please re-open if you think there's still more to do.
Upgraded, but still seeing the same result.
Environment Info:
System:
OS: macOS Mojave 10.14.6
CPU: (8) x64 Intel(R) Core(TM) i7-4870HQ CPU @ 2.50GHz
Binaries:
Node: 12.10.0 - /usr/local/bin/node
Yarn: 1.19.0 - /usr/local/bin/yarn
npm: 6.12.1 - /usr/local/bin/npm
Browsers:
Safari: 13.0.3
npmPackages:
@storybook/addon-docs: ^5.3.0-alpha.41 => 5.3.0-alpha.41
@storybook/addon-knobs: ^5.3.0-alpha.41 => 5.3.0-alpha.41
@storybook/react: ^5.3.0-alpha.41 => 5.3.0-alpha.41

@ryanfitzer do you have a repro repo you can share?
For sure!
Component file: https://gitlab.com/ryanfitzer/design-system-starter/blob/master/components/button/index.js
Docs file: https://gitlab.com/ryanfitzer/design-system-starter/blob/master/components/button/docs.mdx
Component in Storybook: https://ryanfitzer.gitlab.io/design-system-starter/?path=/docs/components-button--default-story
@patricklafrance It looks like this was a valid concern after all. Do you mind taking a look at the bug?
Sure, I will have a look after the refactor.
If you can add a repro case to the cra-ts-kitchen-sink that would be awesome!
@shilman
This has been resolved since at least 5.3.0-beta.10. More context in #8162.
Most helpful comment
This has been resolved since at least
5.3.0-beta.10. More context in #8162.