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: docs/guide/animations.md
+8-4Lines changed: 8 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -161,7 +161,9 @@ You can also use individual animation properties:
161
161
162
162
## Using with Reanimated Components
163
163
164
-
CSSX animations work with Reanimated v4's animated components:
164
+
CSSX animations work with Reanimated v4's animated components.
165
+
166
+
**Important:** Only use `Animated.*` components on elements that have `animation` or `transition` in their styles. Elements with static styles should use regular React Native components (`View`, `Text`, etc.).
165
167
166
168
```jsx
167
169
import { styl } from'cssxjs'
@@ -250,15 +252,17 @@ A notification toast with enter and exit animations:
250
252
251
253
```jsx
252
254
import { styl } from'cssxjs'
253
-
import { Pressable } from'react-native'
255
+
import { Pressable, Text } from'react-native'
254
256
importAnimatedfrom'react-native-reanimated'
255
257
256
258
functionToast({ message, visible, onHide }) {
259
+
// Only the outer View needs Animated since it has animation
260
+
// Text elements use regular RN components (no animation on them)
0 commit comments