The reactNode is stored in the store, sometimes causing the component to lose update #2156
-
SummaryAs shown in the figure, when I put the children into sotre, there seems to be a problem with the childen taken out, and I cannot use it under control.
I have three questions
Link to reproductionhttps://stackblitz.com/edit/react-r32udm-pvtuoe?file=PageLayout.tsx Check ListPlease do not ask questions in issues.
Please include a minimal reproduction.
Please check this if you're filing an issue regarding TypeScript.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
|
I'm not sure if I get the point. Can anyone help? |
Beta Was this translation helpful? Give feedback.
-
|
But in my case, it doesn't work, the switch component doesn't work, can you help me? |
Beta Was this translation helpful? Give feedback.


It's still too big, but let me see.
Yeah, that's how it works. Because you cache the node and don't replace on re-render, it always shows the node from the first render.
https://stackblitz.com/edit/react-r32udm-axs5qg