dillon1000/react
Commit
Browse files Warn for duplicate ViewTransition names (#32752)
This adds early logging when two ViewTransitions with the same name are mounted at the same time. Whether they're part of a View Transition or not. This lets us include the owner stack of each one. I do two logs so that you can get the stack trace of each one of the duplicates. It currently only logs once for each name which also avoids the scenario when you have many hits for the same name in one commit. However, we could also possibly log a stack for each of them but seems noisy. Currently we don't log if a SwipeTransition is the first time the pair gets mounted which could lead to a View Transition error before we've warned. That could be a separate improvement.
Changed paths2 files
First-parent comparisonpackages/react-reconciler/src/ReactFiberCommitWork.js ModifiedA packages/react-reconciler/src/ReactFiberDuplicateViewTransitions.js AddedPatch
Files changed
Rendering syntax-highlighted changes…