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

Setup for aligning React Native Feature Flags #28425

Closed
wants to merge 2 commits into from

Conversation

yungsters
Copy link
Contributor

@yungsters yungsters commented Feb 23, 2024

Summary

Configures a bunch of the React Native feature flags in an effort to begin aligning them to React DOM.

The following list summarizes the feature flag changes at a high level:

  • RN FB
    • Change to Dynamic
      • consoleManagedByDevToolsDuringStrictMode
      • enableAsyncActions
      • enableDeferRootSchedulingToMicrotask
      • enableInfiniteRenderLoopDetection
      • enableRenderableContext
      • useModernStrictMode
    • Always Enable
      • enableCache
      • enableCustomElementPropertySupport
    • Default (Experimental)
      • enableUseDeferredValueInitialArg
  • RN OSS
    • Always Enable
      • disableLegacyContext
      • enableCache
      • enableCustomElementPropertySupport
    • Profiler Only
      • enableSchedulingProfiler
  • RN Test
    • Always Enable
      • disableLegacyContext (pending validation after this PR is created)
      • disableModulePatternComponents
      • enableCustomElementPropertySupport
    • Profiler Only
      • enableSchedulingProfiler

How did you test this change?

Ran the following successfully:

$ yarn test
$ yarn flow native
$ yarn flow fabric

@react-sizebot
Copy link

Comparing: aaa4acb...c519244

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.min.js = 176.86 kB 176.86 kB = 55.14 kB 55.14 kB
oss-experimental/react-dom/cjs/react-dom.production.min.js = 179.01 kB 179.01 kB = 55.78 kB 55.78 kB
facebook-www/ReactDOM-prod.classic.js = 592.40 kB 592.40 kB = 104.67 kB 104.67 kB
facebook-www/ReactDOM-prod.modern.js = 575.68 kB 575.68 kB = 101.66 kB 101.66 kB
facebook-react-native/react-is/cjs/ReactIs-prod.js +13.26% 4.64 kB 5.26 kB +11.21% 1.14 kB 1.27 kB
facebook-react-native/react-is/cjs/ReactIs-profiling.js +13.26% 4.64 kB 5.26 kB +11.21% 1.14 kB 1.27 kB
facebook-react-native/react-is/cjs/ReactIs-dev.js +10.82% 7.26 kB 8.05 kB +9.51% 1.83 kB 2.00 kB
react-native/implementations/ReactFabric-prod.fb.js +9.55% 333.89 kB 365.78 kB +8.74% 59.38 kB 64.57 kB
react-native/implementations/ReactNativeRenderer-prod.fb.js +9.28% 341.49 kB 373.18 kB +8.44% 60.72 kB 65.85 kB
react-native/implementations/ReactFabric-profiling.fb.js +8.87% 361.07 kB 393.08 kB +8.27% 63.58 kB 68.84 kB
react-native/implementations/ReactNativeRenderer-profiling.fb.js +8.63% 368.71 kB 400.54 kB +7.98% 64.95 kB 70.13 kB
react-native/implementations/ReactFabric-dev.fb.js +7.57% 1,011.07 kB 1,087.57 kB +6.81% 203.47 kB 217.32 kB
react-native/implementations/ReactNativeRenderer-dev.fb.js +7.46% 1,025.67 kB 1,102.14 kB +6.73% 207.20 kB 221.15 kB
facebook-react-native/react/cjs/React-prod.js +5.58% 19.13 kB 20.20 kB +4.59% 4.86 kB 5.08 kB
facebook-react-native/react/cjs/React-profiling.js +5.54% 19.27 kB 20.34 kB +4.47% 4.88 kB 5.09 kB
react-native/implementations/ReactFabric-dev.js +3.73% 978.52 kB 1,015.00 kB +2.77% 197.00 kB 202.46 kB
react-native/implementations/ReactNativeRenderer-dev.js +3.67% 994.81 kB 1,031.28 kB +2.72% 201.13 kB 206.61 kB
react-native/implementations/ReactFabric-profiling.js +3.39% 341.80 kB 353.38 kB +2.44% 60.09 kB 61.55 kB
react-native/implementations/ReactNativeRenderer-profiling.js +3.24% 351.69 kB 363.09 kB +2.36% 61.86 kB 63.32 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-prod.js = 315.38 kB 305.72 kB = 55.89 kB 54.32 kB
test_utils/ReactAllWarnings.js Deleted 66.50 kB 0.00 kB Deleted 16.27 kB 0.00 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
facebook-react-native/react-is/cjs/ReactIs-prod.js +13.26% 4.64 kB 5.26 kB +11.21% 1.14 kB 1.27 kB
facebook-react-native/react-is/cjs/ReactIs-profiling.js +13.26% 4.64 kB 5.26 kB +11.21% 1.14 kB 1.27 kB
facebook-react-native/react-is/cjs/ReactIs-dev.js +10.82% 7.26 kB 8.05 kB +9.51% 1.83 kB 2.00 kB
react-native/implementations/ReactFabric-prod.fb.js +9.55% 333.89 kB 365.78 kB +8.74% 59.38 kB 64.57 kB
react-native/implementations/ReactNativeRenderer-prod.fb.js +9.28% 341.49 kB 373.18 kB +8.44% 60.72 kB 65.85 kB
react-native/implementations/ReactFabric-profiling.fb.js +8.87% 361.07 kB 393.08 kB +8.27% 63.58 kB 68.84 kB
react-native/implementations/ReactNativeRenderer-profiling.fb.js +8.63% 368.71 kB 400.54 kB +7.98% 64.95 kB 70.13 kB
react-native/implementations/ReactFabric-dev.fb.js +7.57% 1,011.07 kB 1,087.57 kB +6.81% 203.47 kB 217.32 kB
react-native/implementations/ReactNativeRenderer-dev.fb.js +7.46% 1,025.67 kB 1,102.14 kB +6.73% 207.20 kB 221.15 kB
facebook-react-native/react/cjs/React-prod.js +5.58% 19.13 kB 20.20 kB +4.59% 4.86 kB 5.08 kB
facebook-react-native/react/cjs/React-profiling.js +5.54% 19.27 kB 20.34 kB +4.47% 4.88 kB 5.09 kB
react-native/implementations/ReactFabric-dev.js +3.73% 978.52 kB 1,015.00 kB +2.77% 197.00 kB 202.46 kB
react-native/implementations/ReactNativeRenderer-dev.js +3.67% 994.81 kB 1,031.28 kB +2.72% 201.13 kB 206.61 kB
react-native/implementations/ReactFabric-profiling.js +3.39% 341.80 kB 353.38 kB +2.44% 60.09 kB 61.55 kB
react-native/implementations/ReactNativeRenderer-profiling.js +3.24% 351.69 kB 363.09 kB +2.36% 61.86 kB 63.32 kB
facebook-react-native/react/cjs/React-dev.js +1.31% 123.04 kB 124.65 kB +0.82% 29.50 kB 29.74 kB
facebook-react-native/react/cjs/JSXDEVRuntime-dev.js +1.14% 48.25 kB 48.80 kB +0.53% 12.80 kB 12.86 kB
react-native/implementations/ReactFabric-prod.js +1.13% 323.12 kB 326.78 kB +0.72% 57.03 kB 57.44 kB
facebook-react-native/react/cjs/JSXRuntime-dev.js +1.11% 49.66 kB 50.21 kB +0.55% 13.16 kB 13.24 kB
react-native/implementations/ReactNativeRenderer-prod.js +1.05% 332.30 kB 335.78 kB +0.61% 58.70 kB 59.06 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-profiling.js = 331.28 kB 329.50 kB = 58.33 kB 57.76 kB
facebook-react-native/react-test-renderer/cjs/ReactTestRenderer-prod.js = 315.38 kB 305.72 kB = 55.89 kB 54.32 kB
test_utils/ReactAllWarnings.js Deleted 66.50 kB 0.00 kB Deleted 16.27 kB 0.00 kB

Generated by 🚫 dangerJS against c519244

@@ -35,7 +35,7 @@ export const disableIEWorkarounds = true;
export const enableScopeAPI = false;
export const enableCreateEventHandleAPI = false;
export const enableSuspenseCallback = false;
export const disableLegacyContext = false;
export const disableLegacyContext = true; // TODO: Verify safety of enabling.
Copy link
Member

Choose a reason for hiding this comment

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

Might want to make this dynamic

yungsters added a commit that referenced this pull request Mar 8, 2024
## Summary

This PR is a subset of #28425,
which only includes the feature flags that will be configured as "always
on" (i.e. not "dynamic").

The following list summarizes the feature flag changes:

* RN FB
  * Always Enable
    * enableCache
    * enableCustomElementPropertySupport
* RN OSS
  * Always Enable
    * disableLegacyContext
    * enableCache
    * enableCustomElementPropertySupport
* RN Test
  * Always Enable
    * disableModulePatternComponents
    * enableCustomElementPropertySupport

## How did you test this change?

Ran the following successfully:

```
$ yarn test
$ yarn flow native
$ yarn flow fabric
```
yungsters added a commit that referenced this pull request Mar 9, 2024
## Summary

This PR is a subset of #28425,
which only includes the feature flags that will be configured as
dynamic.

The following list summarizes the feature flag changes:

* RN FB
  * Change to Dynamic
    * consoleManagedByDevToolsDuringStrictMode
    * enableAsyncActions
    * enableDeferRootSchedulingToMicrotask
    * enableRenderableContext
    * useModernStrictMode

## How did you test this change?

Ran the following successfully:

```
$ yarn test
$ yarn flow native
$ yarn flow fabric
```
@yungsters yungsters closed this Mar 9, 2024
@yungsters yungsters deleted the flags branch March 9, 2024 00:15
EdisonVan pushed a commit to EdisonVan/react that referenced this pull request Apr 15, 2024
## Summary

This PR is a subset of facebook#28425,
which only includes the feature flags that will be configured as "always
on" (i.e. not "dynamic").

The following list summarizes the feature flag changes:

* RN FB
  * Always Enable
    * enableCache
    * enableCustomElementPropertySupport
* RN OSS
  * Always Enable
    * disableLegacyContext
    * enableCache
    * enableCustomElementPropertySupport
* RN Test
  * Always Enable
    * disableModulePatternComponents
    * enableCustomElementPropertySupport

## How did you test this change?

Ran the following successfully:

```
$ yarn test
$ yarn flow native
$ yarn flow fabric
```
EdisonVan pushed a commit to EdisonVan/react that referenced this pull request Apr 15, 2024
## Summary

This PR is a subset of facebook#28425,
which only includes the feature flags that will be configured as
dynamic.

The following list summarizes the feature flag changes:

* RN FB
  * Change to Dynamic
    * consoleManagedByDevToolsDuringStrictMode
    * enableAsyncActions
    * enableDeferRootSchedulingToMicrotask
    * enableRenderableContext
    * useModernStrictMode

## How did you test this change?

Ran the following successfully:

```
$ yarn test
$ yarn flow native
$ yarn flow fabric
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants