question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Angular: Cannot render same story more than once in docs

See original GitHub issue

Describe the bug When we need to show a story more than once in the mdx docs then only the first one shows

To Reproduce

ng g new sb-ivy
cd sb-ivy
npx sb@next init 

Remove the default export from Button.stories.ts

Add an mdx page to the button story

<Meta title="Example/Button"
  component={ButtonComponent}
/>

<Canvas>
  <Story story={stories.Primary}/>
</Canvas>

<Canvas>
  <Story id="example-button--primary" />
</Canvas>

npm run storybook

Click the Docs tab and notice the second Story is not rendered.

Screenshot 2021-06-08 at 09 27 17

System Angular 12.0.2

System: OS: macOS 11.4 CPU: (12) x64 Intel® Core™ i7-9750H CPU @ 2.60GHz Binaries: Node: 14.15.5 - ~/.nvm/versions/node/v14.15.5/bin/node Yarn: 1.22.10 - ~/.nvm/versions/node/v14.15.5/bin/yarn npm: 6.14.11 - ~/.nvm/versions/node/v14.15.5/bin/npm Browsers: Chrome: 91.0.4472.77 Edge: 90.0.818.66 Firefox: 88.0.1 Safari: 14.1.1 npmPackages: @storybook/addon-actions: 6.3.0-beta.17 => 6.3.0-beta.17 @storybook/addon-essentials: 6.3.0-beta.17 => 6.3.0-beta.17 @storybook/addon-links: 6.3.0-beta.17 => 6.3.0-beta.17 @storybook/angular: 6.3.0-beta.17 => 6.3.0-beta.17 @storybook/builder-webpack5: 6.3.0-beta.17 => 6.3.0-beta.17 @storybook/manager-webpack5: 6.3.0-beta.17 => 6.3.0-beta.17

Additional context Add any other context about the problem here.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
shilmancommented, Jun 8, 2021

cc @IgorSzyporyn ☝️ another unique ID use case. @ThibaudAV we were discussing https://www.npmjs.com/package/nanoid

0reactions
shilmancommented, Jul 9, 2021

Yowza!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.4.0-alpha.13 containing PR #15501 that references this issue. Upgrade today to the @next NPM tag to try it out!

npx sb upgrade --prerelease
Read more comments on GitHub >

github_iconTop Results From Across the Web

Stories for multiple components - Storybook - JS.ORG
Stories for multiple components. It's useful to write stories that render two or more components at once if those components are designed to...
Read more >
How to troubleshoot storybook not loading stories?
Resave save the story file. It makes the component reappear in side panel, and then you can see the errors ...
Read more >
Singleton services - Angular
A singleton service is a service for which only one instance exists in an application. For a sample application using the app-wide singleton...
Read more >
Dynamic Rendering with Rendertron - Google Developers
Cute cat images in a grid and a button to show more - this web app. Here is the JavaScript: const apiUrl =...
Read more >
Understanding Repaint and Reflow in JavaScript | The Startup
The primary job of a browser engine is to transform HTML documents and other ... that are represented with more than one node...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found