-
Notifications
You must be signed in to change notification settings - Fork 62
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
Add support for Reanimated v3 #67
base: master
Are you sure you want to change the base?
Conversation
0430761
to
cfc589c
Compare
cfc589c
to
07c1811
Compare
@alexZajac is there a possibility to have this merged, we're stuck with Reanimated v2 :/ |
would like to see this merged too, or is there a way to install this fork instead? |
@HaidarZ @ahmed-abdelkader-00 You should be able to install the package from the fork for the time being if you declare the dependency in your
|
What is the status of this pull request? |
I got errors when I tried to install it this way Found 14 errors in 6 files. Errors Files |
I'm getting the same thing as @ahmed-abdelkader-00 Just some type issues @phanghos 🙂 "react-native": "0.72.6", example:
|
same errors as @ahmed-abdelkader-00 mentioned above :( found this alternative : https://github.com/marcuzgabriel/react-native-reanimated-skeleton/ |
We need this to use Reanimated v3, and we need reanimated v3 to run react native 0.72 |
@RohanWeli @ahinkle @ahmed-abdelkader-00 Appreciate this is probably no longer relevant, but should anyone else stumble across this issue in future, here's a fork that fixes the type errors encountered: |
Issue or RFC Endorsed by Atom's Maintainers
Closes #65 and #66
Description of the Change
This MR adds support for Reanimated v3. Previous implementation of
SkeletonContent
was using deprecated functions from v1 which have been removed from the v3 API (v2 was still backwards-compatible). In order to allow users to keep using this package as the React Native ecosystem (and Reanimated) grow and evolve, it is necessary to support more recent versions.The main component has also been refactored into smaller atomic components. This decision was also triggered by the fact that to be able to use some of the new APIs (
useAnimatedStyle
), it is required that the caller is a React component or Hook itself.Helper functions previously living inside the component body have been moved into their own helper file. These functions have all become worklets, since they will be called from the UI thread.
Also, I took the time to upgrade the packages
react-native-linear-gradient
andtypescript
to their latest versions.Finally, I've added the possibility to pass an optional
container
andcontainerProps
props as part of the layout configuration (ICustomViewStyle
) to be able to pass a custom container / wrapper component to wrap the nested children bones.TypeScript type definitions (and type safety) have also been improved
Minor refactorings: use optional chaining where possible, don't use non-null assertion operator blindly, etc...
Alternate Designs
I didn't consider any other alternatives. Upgrading Reanimated and refactoring the component was the only way to go as far as I'm concerned.
Possible Drawbacks
So far, none.
Verification Process
Release Notes