Skip to content

Conversation

@friederbluemle
Copy link
Member

@friederbluemle friederbluemle commented Jul 23, 2023

This PR contains the remaining code changes to enable the Fabric renderer (React Native New Architecture).

A prerequisite PR (#608) has already been merged. The changes also contain the re-applied patch from #604 which is a requirement but needed to be reverted temporarily (see #613).

The example app has been upgraded to React Native 0.70 to allow testing with the new architecture in #606

The rest of the steps are broken up into logical and easy to review commits.

Shout out and big thanks to @Sunbreak who contributed major work (I kept Sunbreak as the commit author for two of the commits).

After some more testing and external verification, we can hopefully get this PR merged very soon. 🤞

In order to run the example app using new architecture, follow these steps (after the usual Yarn dependency installation etc), in the example/ folder:

Android

ORG_GRADLE_PROJECT_newArchEnabled=true yarn android

iOS

RCT_NEW_ARCH_ENABLED=1 npx pod-install && yarn run-ios

This PR also updates CI workflows and splits the two build-android and build-ios jobs into two separate -oldarch/-newarch jobs each, to test the build with and without the new architecture enabled. The jobs will run in parallel, so it will take almost the same amount of time.

Closes #552
Closes #575
Closes #593
Closes #622

Testing Overview

React Native Android (Paper) Android (Fabric) iOS (Paper) iOS (Fabric)
0.63 N/A N/A
0.67 N/A N/A
0.70
0.71
0.72

Copy link

@hsjoberg hsjoberg left a comment

Choose a reason for hiding this comment

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

I reviewed the code, but I'm not that familiar with the codebase nor Fabric.

But I tested both iOS and Android on react-native 0.72.3. No issues.

@friederbluemle
Copy link
Member Author

@hsjoberg - Thanks a lot for taking time for the review and testing. I will also do some additional testing this weekend, and hopefully we'll have a first prerelease ready by next week.

@shikharmohan
Copy link

@friederbluemle do you have an updated timeline on this one?

@friederbluemle
Copy link
Member Author

@shikharmohan - You can expect an initial alpha version for testing in the next couple of days!

@mvpdsolutions
Copy link

@shikharmohan - You can expect an initial alpha version for testing in the next couple of days!

Nice, does alpha version mean that you can download it with npm?

@friederbluemle
Copy link
Member Author

@shikharmohan - You can expect an initial alpha version for testing in the next couple of days!

Nice, does alpha version mean that you can download it with npm?

Yes, you will be able to use npm, but the latest tag will continue to point to the existing stable version (currently 2.8.2), so that regular users won't be impacted. Additional instructions will follow!

@friederbluemle friederbluemle force-pushed the fabric branch 2 times, most recently from 608eb07 to a96b913 Compare August 10, 2023 08:21
@friederbluemle friederbluemle merged commit ac5edee into react-native-linear-gradient:master Aug 10, 2023
@friederbluemle friederbluemle deleted the fabric branch August 10, 2023 20:16
@friederbluemle
Copy link
Member Author

@hsjoberg @shikharmohan @mvpdsolutions @WadhahEssam - This PR has been merged and published as https://github.com/react-native-linear-gradient/react-native-linear-gradient/releases/tag/v3.0.0-alpha.0

When you have a chance please test and report any issues.

v3.0.0-alpha.0 is a prerelease that uses the next dist tag on npm, so that regular users continue to receive a stable version via the default latest tag.

In order to test this new prerelease, use the following commands:

Yarn

yarn add react-native-linear-gradient@next

npm

npm i react-native-linear-gradient@next

@mvpdsolutions
Copy link

@hsjoberg @shikharmohan @mvpdsolutions @WadhahEssam - This PR has been merged and published as https://github.com/react-native-linear-gradient/react-native-linear-gradient/releases/tag/v3.0.0-alpha.0

When you have a chance please test and report any issues.

v3.0.0-alpha.0 is a prerelease that uses the next dist tag on npm, so that regular users continue to receive a stable version via the default latest tag.

In order to test this new prerelease, use the following commands:

Yarn

yarn add react-native-linear-gradient@next

npm

npm i react-native-linear-gradient@next

Hi @friederbluemle,
Sorry for the wait, but I have tested it. And the linear-gradient now works for fabric.
Thank you very much for the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

5 participants