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

Migrate Animated module to universal react-animated package #28892

Closed
wants to merge 1 commit into from
Closed

Migrate Animated module to universal react-animated package #28892

wants to merge 1 commit into from

Conversation

EvanBacon
Copy link
Contributor

@EvanBacon EvanBacon commented May 13, 2020

Summary

Popular packages like react-native-web and react-spring both vendor react-native's Animated module in order to use it in the browser while maintaining a reasonable bundle size. This change makes it possible to use the universal Animated module in any React project without installing all of React Native.

  • The API interface of react-native shouldn't change at all.
  • It might also make sense to move the Libraries/NativeAnimation package into react-animated too.

Changelog

[General] [Added] - Refactor Libraries/Animated into react-animated and make react-native depend on react-animated
[General] [Removed] - Removed Libraries/Animated -- this breaks any import that reaches into the internals of Animated like react-native/Libraries/Animated/*.

Test Plan

TBD -- this PR is currently conceptual, will implement tests after further discussions.

@cpojer thoughts on how versioning could work with the package here?

# Why

Make it possible to use the universal Animated package without installing all of React Native. Popular packages like `react-native-web` and `react-spring` both vendor React Animated in order to use it while maintaining a reasonable bundle size.

# How

Move `Libraries/Animated` to `packages/react-animated` and make `react-native` depend on `react-animated`.
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Expo Partner: Expo Partner labels May 13, 2020
@pull-bot
Copy link

Warnings
⚠️ 🔒 package.json - Changes were made to package.json. This will require a manual import by a Facebook employee.

Generated by 🚫 dangerJS against a53ac09

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Expo Partner: Expo Partner Type: Enhancement A new feature or enhancement of an existing feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants