software-mansion / react-native-reanimated

React Native's Animated library reimplemented
https://docs.swmansion.com/react-native-reanimated/
MIT License
8.6k stars 1.26k forks source link

[Web LA] Fix default transitions. #6124

Closed m-bert closed 2 weeks ago

m-bert commented 2 weeks ago

Summary

Yesterday we've discovered that some basic transitions don't work on web anymore. Turns out that animationName was undefined, therefore transitions were not created.

This PR adds presetName field into transitions, so we can easily obtain their name.

[!NOTE] Similar thing was done in #5562, so I believe that we can stick to this convention.

Test plan

Tested on the following code: ```jsx import Animated, { BounceInLeft, FadeOutRight, FadingTransition, } from 'react-native-reanimated'; import { Button, StyleSheet, View } from 'react-native'; import React from 'react'; export default function BasicLayoutAnimation() { const [state, setState] = React.useState(false); const [visible, setVisible] = React.useState(true); return (