Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46406
As title
Second attempt at landing the new name. There were 2 issues previously which led us to revert.
1. **Error on workrooms tests.** This ended up not being caused by us but rather by D61896776. After renaming the error changed which might've caused the renaming to be blamed for the issue. It has since been resolved
2. **FB crash** FB was crashing when using drop-shadow after renaming. For some reason after renaming `filter` an invalid stylex property was making FB crash. We don't know why renaming uncovered the issue but the the code was using unsupported features on RN (`calc` & `stylex`) which then led to passing a raw unsupported value for `filter` and crashing on the `processFilter` function.
FB was fixed here D62407454 to prevent crashing after landing this diff
Changelog: [General] [Changed] - Add official `filter` CSSProperty.
Reviewed By: NickGerleman
Differential Revision: D62401985
fbshipit-source-id: 14422603c40b7ddf8300029165a85655354075c3
Summary:
This PR fixes an issue with PrivacyInfo files.
When generating a new project for using the latest RC 0.76.0.rc0 I got two privacy manifests references in Xcode.
This is because `PrivacyManifestUtils` look for build phase reference:
```ruby
reference_exists = target.resources_build_phase.files_references.any? { |file_ref| file_ref&.path&.end_with? "xcprivacy" }
```
Which doesn't exist for the generated template.
Here is how Xcode file tree looks like after installing pods:

## Changelog:
[IOS] [FIXED] - don't reference PrivacyInfo.xcprivacy twice for new projects
Pull Request resolved: https://github.com/facebook/react-native/pull/46457
Test Plan:
1. Generate a new project
2. Execute pod install
3. Check if only one PrivacyInfo file exists
Reviewed By: cortinico
Differential Revision: D62580116
Pulled By: cipolleschi
fbshipit-source-id: 1224a41307ae6c9b862832f145baf0edc92476d6
Summary:
This change bumps the React Native version in main to 0.77
bypass-github-export-checks
## Changelog:
[General][Changed] - Bump main to 0.77-main
## Facebook:
generated by running `js1 publish react-native 0.77.0-main`
Reviewed By: cortinico
Differential Revision: D62575939
fbshipit-source-id: 6d239fca2eed6cfe51f8c37f78d8dc8730c18b8c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46418
changelog: [internal]
introduce a small performance optimisation on Android.
When Paragraph is preallocated, it does not have valid C++ state. But we still send it to Android layer because it is part of a more generic pipeline. This has a cost because Android will end up using the state to update internal state on ReactTextView. To avoid this, simply add a special case to view preallocation and prevent it from sending C++ state.
Reviewed By: javache
Differential Revision: D62435529
fbshipit-source-id: 36b5b00a7a390432721d28d53ff8d4af76169e08
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46422
Stubbing SoLoader comes with a couple of breaking changes (e.g. users in OSS are using `com.facebook.common.logging.FLog` which is exposed by Fresco).
In order to reduce those breaking changes, here I'm moving React Native to use SoLoader 0.12.0.
This new version comes with a constructor that accepts a MergedSoMapping implementation which we provide only for OSS apps.
Please note that the CI on this Diff will be red till SoLoader 0.12.0 releases.
Changelog:
[Internal] [Changed] - Do not stub SoLoader and use version 0.12.0
Reviewed By: cipolleschi
Differential Revision: D62447566
fbshipit-source-id: 6ff38799ed0c9f40cf3ab84be8a05979def63dc2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46445
Similarly to onTouchEvent, we should return true from onHoverEvent to signal to Android that the hover event is "handled" (because we've dispatched the event to JS). This is important to be able to distinguish multiple stacked React roots on top of each other.
Changelog: [Android][Fixed] Hover events were dispatched incorrectly when multiple ReactRoots were layered.
Reviewed By: mdvacca
Differential Revision: D62529586
fbshipit-source-id: d007c44b8ef56989888eb9a993e1428bd0b72a7b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46404
As title
Second attempt to rename the prop. BoxShadow caused no issues after renaming but it was batched with `filter` which we reverted.
Changelog: [General] [Changed] - Add official `boxShadow` CSSProperty.
Reviewed By: NickGerleman, cyan33
Differential Revision: D62400814
fbshipit-source-id: ad721f6d11d614e987048e55556b05ff74a4747d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46386
Currently, `useAnimatedProps` attempts (and fails) to memoize the `AnimatedProps` instance by using `props` in the dependency array:
https://www.internalfb.com/code/fbsource/[de6bf108ae11fad0e8516617cde6f0cf3152d129]/xplat/js/react-native-github/packages/react-native/Libraries/Animated/useAnimatedProps.js?lines=56-59
However, `props` is very easily invalidated whenever the component is updated by its parent. The only time when it will not be invalidated is if the component that directly uses this hook — `createAnimatedComponent`'s return value — updates state… which never happens.
This changes `useAnimatedProps` so that we memoize `AnimatedProps` using only the nested property values that actually require a new `AnimatedProps` object to be created, which are `AnimatedNode` subclasses.
A minor detail is that in order for `AnimatedProps.prototype.__getValue` to continue working, we must supply `props` when we're actualizing the `AnimatedNode` instances into real values. This is accomplished by introducing a new method to select `AnimatedNode` subclasses: `__getValueFromStatic{Props,Object,Style,Transforms}`
Changelog:
[General][Added] - Created an experimental optimization to improve memoization within `Animated` to improve product performance
Reviewed By: javache
Differential Revision: D61997128
fbshipit-source-id: 2ca3cfb1038ba9a0abd82904acbc5cb4eb41a45d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46438
When hiding a view with React.Activity, React will "detach" all the views in teh subtree (call all their effect cleanups) and then upon showing it again will attach them (call all their effects again).
This was previously causing problems with useAnimatedProps and https://github.com/facebook/react-native/pull/46205 was intended to fix it (cc javache), but it's still a perf drain to have to detach all of this and then re-attach it upon show. Worse, it makes it so that we can't actually do any animations upon re-showing a view until all the passive effects have run to re-attach the views to the animations.
So instead, what this diff does is lean on the fact that useInsertionEffect *does not* clean up and rerun when Activity goes from hidden to visible and vice versa. Thus, we can rely on it to only detach the animated node when we're *actually* unmounting - rather than when we're simply hiding/showing.
Changelog:
[General][Changed] - Improved the performance of unmounting (and updating, when an enclosing Activity becomes hidden) Animated components
Reviewed By: yungsters, sammy-SC
Differential Revision: D62398039
fbshipit-source-id: af286e428188b5104f6cfd3fd4d8c9f791dedb8d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46362
Changelog:
[Android] [Fixed] - improve text line height calculation
## Context
There is a recurring issue in React Native where text containing accented characters, non-latin scripts, and special glyphs experiences truncation when line height is set too small, even when the line height equals or exceeds the font size. This problem has a significant impact, particularly when rendering complex text in multiple languages or special character sets.
See: https://docs.google.com/document/d/1W-A80gKAyhVbz_WKktSwwJP5qm6h6ZBjFNcsVbknXhI/edit?usp=sharing for more context
## Investigation
Previously, when font metrics (ascent, descent, top, bottom) exceeded the line height, the logic arbitrarily prioritized descent over ascent and bottom top. This led to vertical misalignment and text clipping at the top of the text.
## Proposed Implementation:
1. Descent Exceeds Line Height:
Descent is capped to fit within the line height, setting ascent and top to 0, similar to the current behavior.
2. Shrink ascent and descent equally:
When the combined ascent and descent exceed the line height, the vertical deficit is split proportionally between them, ensuring even distribution of the space.
3. Proportionally shrink top and bottom:
If the top and bottom together exceed the line height, reductions are now applied proportionally based on the delta between top and ascent and bottom and descent.
Reviewed By: NickGerleman
Differential Revision: D62295350
fbshipit-source-id: 81381e8ea18ba9059488468295778c21781e4e7a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46408
## Changelog:
[Android] [Added] - new feature flag for line height calculation
## Context
Adding feature flag for line height calculation centering.
There is a recurring issue in React Native where text containing accented characters, non-latin scripts, and special glyphs experiences truncation when line height is set too small, even when the line height equals or exceeds the font size. This causes issues in rendering complex text in multiple languages or special character sets.
See: https://docs.google.com/document/d/1W-A80gKAyhVbz_WKktSwwJP5qm6h6ZBjFNcsVbknXhI/edit?usp=sharing for more context
## Investigation
Previously, when font metrics (ascent, descent, top, bottom) exceeded the line height, the logic arbitrarily prioritized descent over ascent and bottom top. This led to vertical misalignment and text clipping at the top of the text.
## Implementation:
1. Descent Exceeds Line Height:
Descent is capped to fit within the line height, setting ascent and top to 0, similar to the current behavior.
2. Shrink ascent and descent equally:
When the combined ascent and descent exceed the line height, the vertical deficit is split proportionally between them, ensuring even distribution of the space.
3. Proportionally shrink top and bottom:
If the top and bottom together exceed the line height, reductions are now applied proportionally based on the delta between top and ascent and bottom and descent.
Reviewed By: NickGerleman
Differential Revision: D62421775
fbshipit-source-id: 6b0542426d7ee575f4986e60ddf92247542b65cb
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46429
Right now if I create a `Animated.loop(Animated.parallel(...))`, `config.__isLooping` for nested animations are not `true`. The reason is Animated.parallel doesn't pass down `isLooping`. This change is fixing that.
Changelog: [General][Fixed] - correctly pass down isLooping in parallel animation
Reviewed By: cipolleschi
Differential Revision: D62473189
fbshipit-source-id: 405dd36aa008cc965599ff82333b5552df1eb41f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46435
On main, we want to run CI as fast as possible to catch failures as soon as possible.
Currently, if two commits arrives on main (say commit A and commi B) CI will run on commit B only when it is finished on commit A.
Instead, we would like for CI to run in parallel.
## Changelog
[Internal] - Run CI in parallel on main
Reviewed By: cortinico
Differential Revision: D62496842
fbshipit-source-id: 03dc910deab42af98d92ea8e8e5b90049940dba1
Summary:
This introduces a new issue template for Debugger related issues.
bypass-github-export-checks
Changelog:
[Internal] [Changed] - Add an issue template for React Native DevTools bug reports
Reviewed By: cipolleschi, hoxyq
Differential Revision: D62440315
fbshipit-source-id: c7437d9787a910a2886df50171c86c9ed2412dd6
Summary:
This PR exposes `jsctooling` prefab that contains `facebook::jsc::makeJSCRuntime` used by Reanimated and other third-party libraries previously accessed via `libjscexecutor.so`.
Based on https://github.com/facebook/react-native/pull/46423.
## Changelog:
[Android] [Changed] - Expose jsctooling via prefab
Pull Request resolved: https://github.com/facebook/react-native/pull/46430
Test Plan: Tested on Reanimated paper-example app built from source on RN 0.76.0-rc.0 with JSC enabled
Reviewed By: cipolleschi
Differential Revision: D62492763
Pulled By: cortinico
fbshipit-source-id: 53b6c0d9bb88559c40b5b8796bf6a1513bd388d9
Summary:
This PR fixes the following error when building third-party libraries that `#include <react/fabric/Binding.h>` which includes `react/timing/primitives.h` which is not included in `reactnative` prefab.
```
FAILED: CMakeFiles/rnscreens.dir/src/main/cpp/NativeProxy.cpp.o
/Users/tomekzaw/Library/Android/sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/darwin-x86_64/bin/clang++ --target=aarch64-none-linux-android24 --sysroot=/Users/tomekzaw/Library/Android/sdk/ndk/26.1.10909125/toolchains/llvm/prebuilt/darwin-x86_64/sysroot -DFOLLY_NO_CONFIG=1 -Drnscreens_EXPORTS -I/Users/tomekzaw/RNOS/react-native-reanimated/node_modules/react-native-screens/android/../cpp -isystem /Users/tomekzaw/.gradle/caches/8.10.1/transforms/eb5443cef7868b6c3cc54bbf3f161a63/transformed/react-android-0.76.0-rc.0-debug/prefab/modules/jsi/include -isystem /Users/tomekzaw/.gradle/caches/8.10.1/transforms/eb5443cef7868b6c3cc54bbf3f161a63/transformed/react-android-0.76.0-rc.0-debug/prefab/modules/reactnative/include -isystem /Users/tomekzaw/.gradle/caches/8.10.1/transforms/b0878eb14f826ac5f04db98523604de2/transformed/fbjni-0.6.0/prefab/modules/fbjni/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fno-limit-debug-info -fPIC -std=c++20 -MD -MT CMakeFiles/rnscreens.dir/src/main/cpp/NativeProxy.cpp.o -MF CMakeFiles/rnscreens.dir/src/main/cpp/NativeProxy.cpp.o.d -o CMakeFiles/rnscreens.dir/src/main/cpp/NativeProxy.cpp.o -c /Users/tomekzaw/RNOS/react-native-reanimated/node_modules/react-native-screens/android/src/main/cpp/NativeProxy.cpp
In file included from /Users/tomekzaw/RNOS/react-native-reanimated/node_modules/react-native-screens/android/src/main/cpp/NativeProxy.cpp:2:
In file included from /Users/tomekzaw/.gradle/caches/8.10.1/transforms/eb5443cef7868b6c3cc54bbf3f161a63/transformed/react-android-0.76.0-rc.0-debug/prefab/modules/reactnative/include/react/fabric/Binding.h:17:
In file included from /Users/tomekzaw/.gradle/caches/8.10.1/transforms/eb5443cef7868b6c3cc54bbf3f161a63/transformed/react-android-0.76.0-rc.0-debug/prefab/modules/reactnative/include/react/jni/JRuntimeScheduler.h:11:
In file included from /Users/tomekzaw/.gradle/caches/8.10.1/transforms/eb5443cef7868b6c3cc54bbf3f161a63/transformed/react-android-0.76.0-rc.0-debug/prefab/modules/reactnative/include/react/renderer/runtimescheduler/RuntimeScheduler.h:11:
/Users/tomekzaw/.gradle/caches/8.10.1/transforms/eb5443cef7868b6c3cc54bbf3f161a63/transformed/react-android-0.76.0-rc.0-debug/prefab/modules/reactnative/include/react/performance/timeline/PerformanceEntryReporter.h:10:10: fatal error: 'react/timing/primitives.h' file not found
#include <react/timing/primitives.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
```
## Changelog:
[ANDROID] [FIXED] - Expose `react_timing` headers in `reactnative` prefab
Pull Request resolved: https://github.com/facebook/react-native/pull/46427
Test Plan: Tested on Reanimated fabric-example app with react-native-screens installed built from source on top of RN 0.76.0-rc.0 with new arch enabled
Reviewed By: cipolleschi
Differential Revision: D62492707
Pulled By: cortinico
fbshipit-source-id: 94ed7044457bea53660a6ca6d5342cf8ea20a8b4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46376
Ideally we would use Fusebox directly but it's not supported in release build. This is a clever work around that:
1) Allows us to use Perfetto to start/stop a trace, otherwise we'd need to build another way to do that which would be either hacky and/or complex.
2) Implements tacking Hermes JS samples and putting them inside of Fusebox traces.
3) Manually taking the trace and opening them in an instance of devtools.
Reviewed By: rubennorte
Differential Revision: D62263012
fbshipit-source-id: 49468914d2b7e5da4761329b176f140b917a404d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46421
Changelog: [Internal]
Avoid using the Context as a cache key, using only the asset name.
Reviewed By: Abbondanzo
Differential Revision: D62445718
fbshipit-source-id: 4161e6ef1bbc396c8ab815cdc0362159411f6a68
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46423
This is used by Reanimated as they were previously accessing `libhermes_executor.so`
Changelog:
[Android] [Changed] - Expose hermestooling via prefab
Reviewed By: cipolleschi
Differential Revision: D62447875
fbshipit-source-id: e863c56bc5a801ee7de8a4e5d45f95481d3497f8
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46415
Changelog: [Internal]
Cache the results checking for vector content. This check is decompressing the asset content and parsing XML to check for vector graphics. Caching the result per context/asset name removes the need to parse the content on each image assignment.
Reviewed By: Abbondanzo
Differential Revision: D62436412
fbshipit-source-id: 9e1fe9f0747c9a30ac0d89124b6909d4260a2a2f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46356
# Changelog:
[Internal]-
Currently TextInput does not expose `editable` and `readOnly` (only `editable` is exposed as Android-specific prop).
This change is to add them to BaseTextInputProps so they can be supported cross-platform.
Reviewed By: rshest
Differential Revision: D62180722
fbshipit-source-id: 6cb82589f1d36b61167761f5a2e70e8d4b31b01b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46405
Creates a feature flag for enabling the `Animated` code paths utilizing the new allowlist features. This enables us to validate the impact on product performance and developer experience before fully rolling it out.
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D62405286
fbshipit-source-id: be4a4786d4d2f44504f7788e473c12ed432ef1cd
Summary:
This is a pick on main of a fix necessary to release 0.76.x
## Changelog:
[INTERNAL] - Fix wrong command for publishing of external-artifacts
Pull Request resolved: https://github.com/facebook/react-native/pull/46417
Test Plan: CI
Reviewed By: cipolleschi
Differential Revision: D62440193
Pulled By: cortinico
fbshipit-source-id: 57ea0736c1b6e3e60b048a46770356901de74024
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46170
This PR expose to JS a few missing text content types on iOS (available from iOS 15)
- dateTime
- flightNumber
- shipmentTrackingNumber
## Changelog
[General][Added] - Expose missing text content type to JS
Reviewed By: blakef
Differential Revision: D61657788
fbshipit-source-id: 1a0ea0e76efaf715d88bcbf249f7cb20b5f3607b
Summary:
Solves this issue: https://github.com/facebook/react-native/issues/44107
## Changelog:
<!-- Help reviewers and the release process by writing your own changelog entry.
Pick one each for the category and type tags:
[ANDROID|GENERAL|IOS|INTERNAL] [BREAKING|ADDED|CHANGED|DEPRECATED|REMOVED|FIXED|SECURITY] - Message
For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[IOS] [ADDED] - Line break mode for TextInput components. **This includes JS APIs for the new mode.**
This PR is a breakdown of [this](https://github.com/facebook/react-native/pull/45968) PR.
Pull Request resolved: https://github.com/facebook/react-native/pull/46128
Test Plan:
- Added unit tests to cover the new JS APIs.
- Verified that the new mode functions as expected through manual testing.
Reviewed By: andrewdacenko
Differential Revision: D61657004
Pulled By: cipolleschi
fbshipit-source-id: 9fc5c40fc077bee8e1abc51b6eae2e0f0fcd9b8f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46413
When testing RNTester for Android during a release, we downloads the APKs from CI to save time.
Sadly, we were downloading the Release APKs instead of the Debug ones, so we could not test te integration with Metro.
This change fixes the testing scripts to download the debug APK
## Changelog
[Internal] - Download the debug APK instead of the Release one
Reviewed By: cortinico
Differential Revision: D62436023
fbshipit-source-id: 08a568caf3e5c85b9da933bc01623587bd36affe
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46385
Changes `NativeAnimatedAllowlist` to export a "default allowlist" for use with "native animated components" (i.e. components that are only used with `Animated` values with `useNativeDriver`).
This required some minor internal implementation changes in order to make the allowlist conform to `{[string]: true}`, so I also added some unit tests to ensure the functionality remains the same.
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D62351434
fbshipit-source-id: e92b7245c0d61da87a0d149ffeb967f1ebb888a2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46374
Creates an experimental `allowlist` parameter that can be supplied to a new `unstable_createAnimatedComponentWithAllowlist` method for use in new experiments to evaluate the impact on product performance and developer experience.
When it is provided, only the props and styles in `allowlist` will be inspected for `AnimatedNode` values. The hypothesis for this change is that restricting the search space for `AnimatedProps` to an allowlist will significantly reduce the runtime overhead of using `Animated` components.
Changelog:
[General][Added] - Created an experimental (unstable) method for allowlisting props when using `Animated`
Reviewed By: javache
Differential Revision: D62117424
fbshipit-source-id: bdd656be1fdc7454360035627644606cb00d33c0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46384
Minor refactor to reduce duplicated logic when traversing props and styles in `AnimatedProps` and `AnimatedStyle`, respectively.
This refactor also makes a future optimization (in which we want to skip processing certain props) more straightforward to implement.
Changelog
[Internal]
Reviewed By: javache
Differential Revision: D62351078
fbshipit-source-id: 63c06462c99ef83f3b511456a3281b940b7a3ac0
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46383
Minor refactors to the internal types of `AnimatedProps` and `AnimatedStyle` to avoid using `Object` and `any`.
This also migrates private properties prefixed with `_` to instead use `#` (ECMAScript private properties). This has the desired benefit of minimizing thrash in the `public-api-test.js` snapshot, too.
There are no behavior changes associated with this commit.
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D62351005
fbshipit-source-id: bb69d4db50aef5e0b3193971dac581686e359a95
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46382
Deletes the `AnimatedNode.prototype.toJSON` method.
It was originally introduced by [facebook/react-native#7442](https://github.com/facebook/react-native/pull/7442) as a means to resolve [facebook/react-native#7441](https://github.com/facebook/react-native/issues/7441), where an error occurs attempting to serialize `AnimatedNode` instances.
However, this is no longer needed for that purpose because our inspector implementation is now more resilient. (It correctly reports the current style value instead of the `AnimatedNode` instance.)
The impetus for this change is that this `toJSON` method prevents a future performance optimization for all `Animated` components.
Changelog:
[General][Changed] - AnimatedNode (and its subclasses) no longer implement `toJSON()`.
Reviewed By: javache
Differential Revision: D62350726
fbshipit-source-id: c68edc98878e58d48bc677c4f1299bb1bd15c9c4
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46317
Changes `AnimatedProps` to avoid allocating `AnimatedStyle` (and `AnimatedTransform`, `AnimatedObject`) unless necessary.
This not only reduces memory and traversal overhead, but it enables us to implement allowlist strategies to prune unnecessary traversals.
Changelog:
[General][Changed] - Animated now omits `style` if the supplied value is null, undefined, or not an object. Previously, it would emit an empty `style` object.
[General][Changed] - Animated now resolves `style` to the original prop value if it contains no `AnimatedNode` instances. Previously, it would resolve to a flattened style object.
Reviewed By: javache
Differential Revision: D62117423
fbshipit-source-id: 34b0c9940be5b6f5d94467993a5344406cc56f93
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46373
Currently, the logic for managing the native subscription in `AnimatedNode` is scattered and difficult to follow. This refactors the code to make the subscription's state easier to understand and harder to break in future refactors.
Changelog:
[Internal]
Reviewed By: javache
Differential Revision: D62268695
fbshipit-source-id: 098cc6413db2abffa80983116dd0a5f440ba6fce
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46400
Since React 19 is not yet stable, we cannot publish a release of React Native depending on it, yet. As such, we have to revert our dependency on React 19 and bring back patterns such as `forwardRef`.
This is a spiritual revert of https://github.com/facebook/react-native/pull/45197.
Changelog:
[Internal]
Reviewed By: cipolleschi
Differential Revision: D62384482
fbshipit-source-id: 880ad1166e0b449ad5be6f914907661adb5f458d
Summary:
## Summary
This PR bumps Flow all the way to the latest 0.245.2.
Most of the suppressions comes from Flow v0.239.0's change to include
undefined in the return of `Array.pop`.
I also enabled `react.custom_jsx_typing=true` and added custom jsx
typing to match the old behavior that `React.createElement` is
effectively any typed. This is necessary since various builtin
components like `React.Fragment` is actually symbol in the React repo
instead of `React.AbstractComponent<...>`. It can be made more accurate
by customizing the `React$CustomJSXFactory` type, but I will leave it to
the React team to decide.
## How did you test this change?
`yarn flow` for all the renderers
DiffTrain build for commit https://github.com/facebook/react/commit/e210d08180a63f42079b91acaa7f6af15eef6d32.
Reviewed By: yungsters
Differential Revision: D62384646
Pulled By: SamChou19815
fbshipit-source-id: 727794f2d4091f37d771854b8e8a52f070309213
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46402
JS code for importing SafeAreaView is causing error in windows due to import being used.
Fix it by using conditional require instead
Changelog:
[Internal] - Fixed mis-used import of core only SafeAreaView in JS
Reviewed By: fkgozali
Differential Revision: D62392588
fbshipit-source-id: 65c4728ff73b43cc54543ec2d141a88fce1275ca
Summary:
This PR fixes animating controlled `Switch` component when it's initial value is set to `false`
When initial value was set to `false`, `_isInitialValueSet` flag wasn't changed to `YES`, because `oldSwitchProps.value` &`newSwitchProps.value` were equal, which resulted in controlled `Switch` component being updated without animation on first value change
This PR fixes it by moving setting `_isInitialValueSet` flag to the end of `updateProps` method
## Changelog:
[IOS] [FIXED] - Fix animating Switch component value change in Fabric
Pull Request resolved: https://github.com/facebook/react-native/pull/46173
Test Plan:
1. Open `Switch` example in `RNTester`
2. In `Change events can be detected` section press switch that is `off` by default
3. Switch under it should change with animation
Reviewed By: javache
Differential Revision: D62377771
Pulled By: cipolleschi
fbshipit-source-id: 0213287c935db79a199b086ebb36a6979df03913