-
-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
addon-notes causes story to not render and shows error instead #3442
Comments
Notes as object feature is only in |
Ah sorry that's correct. Thank you! |
I got the same error as shown above, but the problem was the incorrect documentation (using The docs say storiesOf('Button', module).add('with some emoji', () => (
withNotes('A very simple component')(() =>
<Button onClick={action('clicked')}>
<span role="img" aria-label="so cool">😀 😎 👍 💯</span>
</Button>
)); // <= there is a bracket too much, I believe ;)
)); But the addon's docs say storiesOf('Component', module).add(
'with some emoji',
withNotes('A very simple component')(() => <Component />)
) So in storybook's documentation the 2nd argument is incorrectly wrapped in a function, I guess. |
Fair point @jneuendorf, would you like to send a PR? |
@Hypnosphi On my way to the PR I noticed, that the docs have already changed significantly: apparently the addons API has changed and already been applied to the docs (see d1d8138 by @tmeasday). So now the question has become: Looking through the package.json I assume one of these commands must be run in order to deploy the latest docs:
|
@jneuendorf - this is because You could submit a fix on the |
@tmeasday Sorry I didn't think of that. Can you guess how long it'll take until |
@jneuendorf I'm not totally sure -- @ndelangen? I would say at least a couple of weeks. Haven't done an rc yet. |
I think it's worth fixing the docs, would really appreciate that PR @jneuendorf! |
#4132 should do ;) |
If you are reporting a bug or requesting support, start here:
Bug or support request summary
Using
addon-notes
causes story to not render. Instead it renders an error "Expecting a valid React element from the story...Seems like you are not returning a correct React element from the story.Could you double check that?"
Steps to reproduce
Steps to reproduce:
Here is a link to a repository where I have recreated the problem: https://github.com/terrencewwong/storybook-addon-notes-example
To summarize, this is what I did:
This is the code for the story that is in the repo I linked:
Please specify which version of Storybook and optionally any affected addons that you're running
@storybook/react v3.4.2
@storybook/addon-notes v3.4.2
The text was updated successfully, but these errors were encountered: