Uncontrolled Deck with new React Activity component #9921
-
|
Hello! I am playing with the new Activity component in React 19.2. I noticed that if I dont control a Deck instance, only supply it an initial view state, every time the Activity is toggled to visible from hidden, the state of the Deck instance is reset. I thought Activity did not unmount hidden components, so I expected the state to not be lost. Any ideas why the state is lost? Small example app: npm run dev I have 2 maps and a random div you can toggle between. One map uses an activity, and the other uses css display: none when hidden. The css hiding retains state, the activity does not. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
any ideas on this? thanks. |
Beta Was this translation helpful? Give feedback.
-
|
Thanks for reporting! I'm putting together an issue track React 19 Activity support. The root cause needs further investigation, but in the meantime you can try working around this by using controlled mode with |
Beta Was this translation helpful? Give feedback.
Opened #9983