Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Web LA] Add warning about transform #6064

Merged
merged 7 commits into from
Jun 14, 2024
Merged

Conversation

m-bert
Copy link
Contributor

@m-bert m-bert commented May 29, 2024

Summary

In #6060 I've removed adding already existing transform into layout animations on web (you can read more about reasoning in the mentioned PR). This PR adds warning for users that suggests creating animated wrapper if Animated.View with layout animation contains transform in style.

Test plan

Tested on example app (MountingUnmounting example) and on the following code:

Test code
import { StyleSheet, View } from 'react-native';
import React from 'react';
import Animated, { LightSpeedInLeft } from 'react-native-reanimated';

export default function EmptyExample() {
  return (
    <View style={styles.container}>
      <Animated.View
        entering={LightSpeedInLeft.duration(2500)}
        style={{
          width: 100,
          height: 100,
          backgroundColor: 'crimson',
          transform: [{ skewX: '25deg' }],
        }}
      />
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    alignItems: 'center',
    justifyContent: 'center',
  },
});

Base automatically changed from @tjzel/monorepo-remove-reanimated2 to @tjzel/monorepo June 5, 2024 15:36
Base automatically changed from @tjzel/monorepo to main June 10, 2024 11:01
Copy link
Contributor

@szydlovsky szydlovsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me but let's see what @piaskowyk has to say 👀
And please fix lint

@m-bert m-bert added this pull request to the merge queue Jun 14, 2024
Merged via the queue into main with commit f8d74d8 Jun 14, 2024
6 checks passed
@m-bert m-bert deleted the @mbert/add-transform-warning branch June 14, 2024 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants