r/reactnative • u/beatpaq • 21h ago
Could you recreate this CSS animation in React Native?
I've never used react native.
1
Upvotes
r/reactnative • u/beatpaq • 21h ago
I've never used react native.
2
u/Intrepid-Anywhere255 19h ago
If you are using Reanimated, this maps to one shared progress value and an animated style for translateX, translateY, and rotateZ through 0, 5, 0, -5, then back to 0. Run it with withSequence and withTiming on the UI thread, triggered by the button press, so React does not rerender on every frame.