Skip to content

Commit e627ef4

Browse files
committed
Fix view transition example
1 parent c15e20f commit e627ef4

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/content/reference/react/ViewTransition.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,11 @@ Enter/Exit Transitions trigger when a `<ViewTransition>` is added or removed by
159159

160160
```js
161161
function Child() {
162-
return <ViewTransition>Hi</ViewTransition>
162+
return (
163+
<ViewTransition>
164+
<div>Hi</div>
165+
</ViewTransition>
166+
);
163167
}
164168

165169
function Parent() {
@@ -352,11 +356,7 @@ button:hover {
352356

353357
```js [3, 5]
354358
function Component() {
355-
return (
356-
<div>
357-
<ViewTransition>Hi</ViewTransition>
358-
</div>
359-
);
359+
return <ViewTransition>Hi</ViewTransition>;
360360
}
361361
```
362362

0 commit comments

Comments
 (0)