dillon1000/react
Commit
Browse files Materialize the tree ID when ViewTransition name=auto consumes one (#32651)
ViewTransition uses the `useId` algorithm to auto-assign names. This ensures that we could animate between SSR content and client content by ensuring that the names line up. However, I missed that we need to bump the id (materialize it) when we do that. This is what function components do if they use one or more `useId()`. This caused duplicate names when two ViewTransitions were nested without any siblings since they would share name.
Changed paths3 files
First-parent comparisonfixtures/view-transition/src/components/Page.js ModifiedM packages/react-reconciler/src/ReactFiberBeginWork.js ModifiedM packages/react-server/src/ReactFizzServer.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…