microsoft / react-native-test-app

react-native-test-app provides an app for all supported platforms as a package
MIT License
595 stars 91 forks source link

Breaking changes in 4.0 #1797

Open tido64 opened 9 months ago

tido64 commented 9 months ago

PR: tido/4.0 Timeline: EOY 2024

Breaking changes

Post-publish tasks

kraenhansen commented 7 months ago

Should defaulting to Hermes being enabled be included in this, to match the RN template?

tido64 commented 7 months ago

Should defaulting to Hermes being enabled be included in this, to match the RN template?

So there are two ways we can go about this: 1) enable Hermes by default when generating new projects or 2) enable Hermes by default if this option is unset.

On Android, you can't disable Hermes. On Windows, Hermes is on by default starting with 0.73. iOS/macOS/visionOS currently default to JSC.

Internally at Microsoft, we don't use Hermes on Apple platforms due to the increased bundle size. I'd prefer that we stay closer to this than what Meta currently recommends. I'm not opposed to implementing solution 1 though.

Paging @acoates-ms @kelset @Saadnajmi for more opinions.

kelset commented 7 months ago

I'd also vouch for us keeping the default config closer to our internal needs; maybe we can revisit once RNTA reached a new major where 0.73 is the minimum version supported to match the Windows behaviour? 🤔 Also I'm not super familiar about viability of Hermes on macOS and visionOS.

Is there a flag we can pass when generating a RNTA project that sets Hermes? Like, yarn configure-test-app --use-hermes? If not, maybe that could be a quick tradeoff to make the DX smooth for folks that want to use Hermes?

Saadnajmi commented 7 months ago

I'm personally in favor of using Hermes as the default for new projects (solution 1), though it may vary by platform. To answer @kelset , Hermes works on macOS and visionOS both.

tido64 commented 6 months ago

Starting with 0.73, Hermes is going to be the only viable option for Android and Windows. Chakra is dead. A --use-hermes would only apply to Apple platforms.

I'm going to put down "Hermes as default on iOS/macOS/visionOS in newly created projects" if there are no objections. This will be a very visible oneliner in Podfile and can be easily turned off if necessary.