You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs-reanimated/docs/guides/feature-flags.md
+29-76Lines changed: 29 additions & 76 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -37,95 +37,48 @@ Feature flags available in `react-native-worklets` are listed [on this page](htt
37
37
38
38
When enabled, this feature flag is supposed to eliminate jittering of animated components like sticky header while scrolling. This feature flag is safe to enable only if `preventShadowTreeCommitExhaustion` feature flag from `react-native` (available since React Native 0.81) is also enabled – see instructions below. In all other cases it can lead to unresponsiveness of the app due to the starvation of React commits. For more details, see [PR #7852](https://github.com/software-mansion/react-native-reanimated/pull/7852).
39
39
40
-
In React Native 0.81, `preventShadowTreeCommitExhaustion` feature flag can be enabled by setting experimental release level. If you're using Expo, you can enable it using [`expo-build-properties`](https://docs.expo.dev/versions/latest/sdk/build-properties/):
40
+
:::note
41
+
We no longer recommend setting experimental React Native release level because it also enables other unrelated flags, for instance `fixTextClippingAndroid15useBoundsForWidth`, which supposedly causes incorrect text clipping on Android 15. Instead, you should enable only the `preventShadowTreeCommitExhaustion` feature flag according to the instructions below.
42
+
:::
41
43
42
-
```json
43
-
{
44
-
"expo": {
45
-
// ...
46
-
"plugins": [
47
-
// ...
48
-
// highlight-start
49
-
[
50
-
"expo-build-properties",
51
-
{
52
-
"android": {
53
-
"reactNativeReleaseLevel": "experimental"
54
-
},
55
-
"ios": {
56
-
"reactNativeReleaseLevel": "experimental"
57
-
}
58
-
}
59
-
]
60
-
// highlight-end
61
-
]
62
-
}
63
-
}
64
-
```
44
+
Here's how you can enable `preventShadowTreeCommitExhaustion` feature flag from React Native.
65
45
66
-
It will add the following lines in `gradle.properties` (Android) and `Info.plist` (iOS):
46
+
First, please apply the following change in `ReactNativeFeatureFlagsDefaults.h`:
It is recommended to make a patch after applying this change to make it persistent using tools like [patch-package](https://www.npmjs.com/package/patch-package), [yarn patch](https://yarnpkg.com/cli/patch) or [pnpm patch](https://pnpm.io/cli/patch).
76
56
77
-
If you're not using Expo, in order to enable experimental release level on Android, you need to add the following lines in `MainApplication.kt` of your app:
For Android, please add the following lines in `android/settings.gradle` according to the instructions [here](https://reactnative.dev/contributing/how-to-build-from-source#update-your-project-to-build-from-source):
For iOS, add the following lines in `ios/Podfile` according to the instructions [here](https://reactnative.dev/blog/2026/02/11/react-native-0.84#precompiled-binaries-on-ios-by-default).
123
73
124
-
// ...
125
-
}
126
-
}
74
+
```rb
75
+
ENV['RCT_USE_PREBUILT_RNCORE'] ='0'
127
76
```
128
77
78
+
:::tip
79
+
Flickering/jittering while scrolling will be ultimately fixed by branching mechanism which was introduced in [this PR to React Native](https://github.com/facebook/react-native/pull/54835). Currently it's under testing and should be out in some future release of React Native.
80
+
:::
81
+
129
82
### `ANDROID_SYNCHRONOUSLY_UPDATE_UI_PROPS`
130
83
131
84
When enabled, non-layout styles will be applied using the `synchronouslyUpdateViewOnUIThread` method (which doesn't involve layout recalculation) instead of than `ShadowTree::commit` method (which requires layout recalculation). In an artificial benchmark, it can lead to up to 4x increase of frames per second. Even though we don't expect such high speedups in the production apps, there should be a visible improvements in the smoothness of some animations. However, there are some unwanted side effects that one needs to take into account and properly compensate for:
Copy file name to clipboardExpand all lines: docs/docs-reanimated/docs/guides/performance.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,7 +20,7 @@ Please note that downgrading your Expo SDK version or using an older release of
20
20
21
21
**Problem:** When scrolling a `FlatList` or `ScrollView`, you might notice flickering or jittering of animated components (e.g. sticky header) implemented using `useAnimatedScrollHandler` hook.
22
22
23
-
**Solution:** You need to upgrade to React Native 0.81 (or newer), set experimental release level in order to enable `preventShadowTreeCommitExhaustion` feature flag and enable [`DISABLE_COMMIT_PAUSING_MECHANISM`](/docs/guides/feature-flags#disable_commit_pausing_mechanism) static feature flag as described[here](/docs/guides/feature-flags#disable_commit_pausing_mechanism).
23
+
**Solution:** You need to upgrade to React Native 0.81 (or newer), enable `preventShadowTreeCommitExhaustion`React Native feature flag and enable [`DISABLE_COMMIT_PAUSING_MECHANISM`](/docs/guides/feature-flags#disable_commit_pausing_mechanism) static feature flag. For more details, click[here](/docs/guides/feature-flags#disable_commit_pausing_mechanism).
0 commit comments