` only activates if it is placed before any DOM node:
-```js [3, 5]
+```js {3,5}
function Component() {
return (
@@ -2795,7 +2795,7 @@ function Component() {
To fix, ensure that the `` comes before any other DOM nodes:
-```js [3, 5]
+```js {3,5}
function Component() {
return (
@@ -2809,7 +2809,7 @@ function Component() {
This error occurs when two `` components with the same `name` are mounted at the same time:
-```js [3]
+```js {3}
function Item() {
// 🚩 All items will get the same "name".
return ...;
@@ -2848,7 +2848,7 @@ The existing `` duplicate has this stack trace.
To fix, ensure that there's only one `` with the same name mounted at a time in the entire app by ensuring the `name` is unique, or adding an `id` to the name:
-```js [3]
+```js {3}
function Item({id}) {
// ✅ All items will get a unique name.
return ...;
@@ -2858,7 +2858,7 @@ function ItemList({items}) {
return (
<>
{items.map((item) => (
-
+
))}
>
);
diff --git a/src/content/reference/react/addTransitionType.md b/src/content/reference/react/addTransitionType.md
index 415e7247a4f..c9e43830404 100644
--- a/src/content/reference/react/addTransitionType.md
+++ b/src/content/reference/react/addTransitionType.md
@@ -45,10 +45,10 @@ startTransition(() => {
Call `addTransitionType` inside of `startTransition` to indicate the cause of a transition:
-``` [[1, 6, "addTransitionType"], [2, 5, "startTransition", [3, 6, "'submit-click'"]]
+```js [[1, 6, "addTransitionType"], [2, 5, "startTransition"], [3, 6, "'submit-click'"]]
import { startTransition, addTransitionType } from 'react';
-function Submit({action) {
+function Submit({action}) {
function handleClick() {
startTransition(() => {
addTransitionType('submit-click');
@@ -78,7 +78,7 @@ When a [`ViewTransition`](/reference/react/ViewTransition) activates from a tran
This allows you to customize different animations based on CSS scopes:
-```js [11]
+```js {10}
function Component() {
return (
@@ -127,7 +127,7 @@ startTransition(() => {
If multiple types match, then they're joined together. If no types match then the special "default" entry is used instead. If any type has the value "none" then that wins and the ViewTransition is disabled (not assigned a name).
-These can be combined with enter/exit/update/layout/share props to match based on kind of trigger and Transition Type.
+These can be combined with enter/exit/update/share props to match based on kind of trigger and Transition Type.
```js