You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/reference/react/ViewTransition.md
+58-1Lines changed: 58 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -351,4 +351,61 @@ function Component() {
351
351
</ViewTransition>
352
352
);
353
353
}
354
-
```
354
+
```
355
+
356
+
### I'm getting an error "There are two `<ViewTransition name=%s>` components with the same name mounted at the same time." {/*two-viewtransition-with-same-name*/}
357
+
358
+
This error occurs when two `<ViewTransition>` components with the same `name` are mounted at the same time:
This will cause the View Transition to error. In development, React detects this issue to surface it and logs two errors:
377
+
378
+
<ConsoleBlockMulti>
379
+
<ConsoleLogLinelevel="error">
380
+
381
+
There are two `<ViewTransition name=%s>` components with the same name mounted at the same time. This is not supported and will cause View Transitions to error. Try to use a more unique name e.g. by using a namespace prefix and adding the id of an item to the name.
382
+
{' '}at Item
383
+
{' '}at ItemList
384
+
385
+
</ConsoleLogLine>
386
+
387
+
<ConsoleLogLinelevel="error">
388
+
389
+
The existing `<ViewTransition name=%s>` duplicate has this stack trace.
390
+
{' '}at Item
391
+
{' '}at ItemList
392
+
393
+
</ConsoleLogLine>
394
+
</ConsoleBlockMulti>
395
+
396
+
To fix, ensure that there's only one `<ViewTransition>` with the same name mounted at a time in the entire app by ensuring the `name` is uniquie, or adding an `id` to the name:
0 commit comments