Open gmukul01 opened 5 years ago
So this was the issue for me: https://stackoverflow.com/a/57574625/109458
I had to switch to named imports for FC
, SFC
, etc.
- import React from 'react'
+ import React, { SFC } from 'react'
- export const Button: React.SFC<Props>
+ export const Button: SFC<Props>
It would be great to get this fixed so we can use React.*
default import.
I can submit a PR to add this to the caveats section of the Readme, since the examples show usage of React.SFC
(which normally might work but doesn't when using babel-loader
).
@kamranayub same with:
- import React from 'react'
+ import React, { FunctionComponent } from 'react'
- export const Button: React.FunctionComponent<Props>
+ export const Button: FunctionComponent<Props>
I lost two days to understand why props table doesn't show 🤬, until I found your comment here. Thanks!
Proptable is not coming when I am using babel 7 to transpile the typescript file. Github link for the code.
My webpack config file for the storybook is like this
My Code for the component looks like this
And types file looks like this