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.

is it by design that changing a tab makes all tabs content rerender?

See original GitHub issue

i’m using angular v9.1.0 @storybook/angular v5.3.18 @storybook/addon-notes v5.3.18.

i’m writing components with fade in/out animations then come across this phenomenon.

critical code: https://github.com/storybookjs/storybook/blob/master/lib/client-api/src/story_store.ts#L170

changing a tab will trigger STORY_RENDER event.

then storybook will render all ‘canvas’ and ‘note’ tab content.

can it just render the active tab?

p.s.

  1. hope someone know what i’m talking about. or i have to create a demo to prove it.
  2. it seems that code at next branch has changed. don’t konw if this phenomenon still exists.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:16 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
shilmancommented, May 20, 2020

Huzzah!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.0-beta.9 containing PR #10838 that references this issue. Upgrade today to try it out!

You can find this prerelease on the @next NPM tag.

0reactions
shilmancommented, May 15, 2020

Ok, I get it now. Thanks for explaining ❤️

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ant Design render all the components of tabs when changing ...
It renders all the components of tabs when switching tabs as well. You can see the same console log like the previous case....
Read more >
Tab components - React-Bootstrap
TabContent , and TabPane components along with any style of Nav allow you to quickly piece together your own Tabs component with additional...
Read more >
Why React Re-Renders - Josh W Comeau
I know some developers believe that every state change in React forces an application-wide render, but this isn't true. Re-renders only affect ...
Read more >
How to Build a Tabs Component with React - DigitalOcean
In this article, you will learn how to create a reusable tab container component that you can use by itself or with your...
Read more >
Tabs - Chakra UI
The content of a TabPanel should ideally be preloaded. However, if switching to a tab panel causes a network request and possibly a...
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