Skip to content
This repository has been archived by the owner on Jan 5, 2023. It is now read-only.

React 16 Support? #18

Closed
KamalAman opened this issue Dec 16, 2017 · 7 comments
Closed

React 16 Support? #18

KamalAman opened this issue Dec 16, 2017 · 7 comments
Assignees

Comments

@KamalAman
Copy link

I've tried to use smark knobs with react v16, and I cannot get anything to display or show up in the Knobs viewer.

@ndelangen
Copy link
Contributor

Hi @KamalAman,

Do you think you'd be able to debug the problem and open a PR with a fix? 🙇

@KamalAman
Copy link
Author

KamalAman commented Dec 24, 2017

The issue seems to be with docgen being undefined on the button in the Usage example when using React 16.

The following describes the issue.
storybookjs/storybook#1762
storybookjs/babel-plugin-react-docgen#33

Other than the root problem with Doc gen performing some magical parsing, the Usage documentation for addon-smart-knobs does not accurately describe what needs to be done with React 16.

Button needs to be defined in another file than the story, and it needs to be the default export of that file.

@chrisjaure
Copy link
Contributor

chrisjaure commented Jan 4, 2018

I think this may be related to a storybook change. It was working for me fine in 3.2, but once I upgraded to 3.3, the knobs weren't showing anymore.

It seems to be related to the marksyConf check here: https://github.com/storybooks/addon-smart-knobs/blob/6eb5cb767cb4e0fbbfb95b11384bf38df96db3e6/src/index.js#L60

and here: https://github.com/storybooks/addon-smart-knobs/blob/6eb5cb767cb4e0fbbfb95b11384bf38df96db3e6/src/index.js#L86

Once I removed the checks, it started working again.

What use-case are these checks serving?

@chrisjaure
Copy link
Contributor

Ah I see it was added to support using withInfo (which I am), but that addon has change in this commit: storybookjs/storybook@170f3eb#diff-c944184f73b67670ca1f8d8e29108c12

I wonder if this is a separate issue?

@ndelangen
Copy link
Contributor

Released with 3.3.0

@Hypnosphi
Copy link

@ndelangen we should raise all the @storybook peerDeps to 3.3

@ndelangen
Copy link
Contributor

Done, and published as 3.3.1 @Hypnosphi

@ndelangen ndelangen self-assigned this Jan 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

4 participants