is it by design that changing a tab makes all tabs content rerender?
See original GitHub issuei’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.
- hope someone know what i’m talking about. or i have to create a demo to prove it.
- it seems that code at
next
branch has changed. don’t konw if this phenomenon still exists.
Issue Analytics
- State:
- Created 3 years ago
- Comments:16 (14 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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.Ok, I get it now. Thanks for explaining ❤️