Skip to content

Commit 4fadaf6

Browse files
authored
Update readme.md
1 parent e1f25e5 commit 4fadaf6

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

readme.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ import { Transition } from 'react-spring'
9090
</Transition>
9191
```
9292

93-
#### 2-state Reveals ([Demo](https://codesandbox.io/embed/yj52v5689))
93+
#### 2-state and 1-state Reveals ([Demo](https://codesandbox.io/embed/yj52v5689))
9494

9595
<img src="assets/reveals.gif" width="285" />
9696

@@ -104,6 +104,14 @@ import { Transition } from 'react-spring'
104104
</Transition>
105105
```
106106

107+
If you need to track a single child, that is also possible:
108+
109+
```jsx
110+
<Transition from={{ opacity: 0 }} enter={{ opacity: 1 }} leave={{ opacity: 0 }}>
111+
{toggle && Component}
112+
</Transition>
113+
```
114+
107115
#### Trails and staggered animations ([Demo](https://codesandbox.io/embed/vvmv6x01l5))
108116

109117
<img src="assets/trails.gif" width="285" />

0 commit comments

Comments
 (0)