Граф коммитов

83 Коммитов

Автор SHA1 Сообщение Дата
Christoph Purrer 7c82a3fa11 Add enum example to Android/iOS rn-tester TurboModule (#35133)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35133

Add enum example to Android/iOS rn-tester TurboModule

Changelog:
[General][Added] - Add enum example to Android/iOS rn-tester TurboModule

Reviewed By: javache, cipolleschi

Differential Revision: D40711269

fbshipit-source-id: c8ad6fb7dee40b45b696660cc4d78921edafd8a1
2023-02-08 22:49:30 -08:00
Pieter De Baets 2fbefff178 Remove unreferenced RCTWeakProxy
Summary:
Changelog:
[iOS][Removed] - Removed unused RCTWeakProxy helper

allow-large-files

Reviewed By: sammy-SC

Differential Revision: D43039589

fbshipit-source-id: 9398dfe2f052a63757823018d7072a56271eabac
2023-02-08 06:24:56 -08:00
Ruslan Lesiutin 1479b2ac26 refactor(arvr/xplat): update imports to resolve packaged virtualized list from react-native (#36035)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/36035

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D42805202

fbshipit-source-id: 1f1d6e36ec6e19a1b46ce340be095bb60b8048f4
2023-02-06 13:39:13 -08:00
Ruslan Lesiutin 465e937533 internalize Slider module (#35825)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35825

Changelog:
[iOS][Removed] - removed Slider module
[Android][Removed] - removed Slider module

Reviewed By: cortinico

Differential Revision: D42394124

fbshipit-source-id: 92ba3bc50d16996a597148fa2f8178e6bd6d8eb7
2023-01-16 02:42:18 -08:00
Ruslan Lesiutin ac66512eb3 Revert D41069547: Multisect successfully blamed D40984397 for test or build failures (#35789)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35789

Changelog: [Internal]

This diff is reverting D41069547 (fee9510b2d) D41062668 (4c40014d43) D40984397 (05968d16e1)
D40984397 (05968d16e1) has been identified to be causing the following test or build failures:

We're generating a revert to back out the changes in this diff, please note the backout may land if someone accepts it.

allow-large-files

Differential Revision: D42371475

fbshipit-source-id: daa01c9215811c397f5cef958fd4620f36295b60
2023-01-06 13:06:17 -08:00
Ruslan Lesiutin fee9510b2d refactor(ReactNative/Slider): moved iOS sources to internal (#35365)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35365

# Changelog:
[iOS][Removed] - removed iOS sources of Slider module

Reviewed By: NickGerleman

Differential Revision: D41069547

fbshipit-source-id: 8faf96701f69e19074fafac45b1c95b939c2b1ac
2023-01-05 06:12:47 -08:00
Ruslan Lesiutin 4c40014d43 refactor(ReactNative/Slider): moved android sources to internal
Summary:
# Changelog:
[Android][Removed] - removed android sources of Slider module

Reviewed By: NickGerleman

Differential Revision: D41062668

fbshipit-source-id: fe628527f757d4fefa8ecf2c0c952aaf8d4acec2
2023-01-05 06:12:47 -08:00
Ruslan Shestopalyuk 09ad0cc0c6 Implement reporting of events from native side to WebPerformance API (#35768)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35768

Changelog: [Internal]

This implements native side mechanics for reporting user events timing to JS  (PerformanceObserver API).

See the standard for more details: https://www.w3.org/TR/event-timing/

The events are only logged when there are any active subscriptions (via `PerformanceObserver.observe`), also we only log "discrete events" (i.e. no likes of mouse move), so the overhead is non-existing.

There are two main metrics of interest for an event lifecycle:
* Time the event is spent in the queue, i.e. the time between it's created and dispatched
* Time that is spend in the event handler on the JS side (event dispatch), or processing time

Both of these are measured, and the corresponding fields are populated.

Reviewed By: sammy-SC

Differential Revision: D42294947

fbshipit-source-id: 4fd7938c04b942400befa4057d4929fb2763cee1
2023-01-03 11:11:37 -08:00
Ruslan Latypov 2e2cd302f1 fix missing imports and set disable_infer_precompiled_header]
Reviewed By: adamjernst

Differential Revision: D41704378

fbshipit-source-id: 92bcbc8710e75e6eccfb252986ebd7b5f8645ba6
2022-12-04 13:30:16 -08:00
Riccardo Cipolleschi f3bf4d02ab Move JSCRuntime into its own folder (#35482)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35482

This change moves the JSCRuntime.h/cpp into a `jsc` folder.

This change is required for several reasons:
1. on iOS, the new `jsi`, `jsidynamic` and `jsc` setup is breaking the `use_frameworks!` with  `:linkage => :static` option with the old architecture. So it is a regression.
2. JSCRuntime is required by some libraries and needs to be exposed as a prefab and the current setup makes it hard to achieve.

allow-large-files

## Changelog:
[General][Changed] - Move JSCRuntime into a separate pod/prefab

Reviewed By: cortinico

Differential Revision: D41533778

fbshipit-source-id: 642240c93a6c124280430d4f196049cb67cb130b
2022-11-28 04:13:55 -08:00
Richard Howell 88d1825c73 remove -weak_framework (#89233)
Summary:
X-link: https://github.com/pytorch/pytorch/pull/89233

The `-weak_framework` flag is no longer necessary, Buck will weakly link frameworks depending on the `target_sdk_version` of the binary being linked.

Reviewed By: ebgraham, malfet

Differential Revision: D41348639

fbshipit-source-id: 47992282ba030294b2304c550d49df13e24e9c79
2022-11-18 08:23:55 -08:00
Adam Gleitman 11c8bf3137 Add Dynamic Type support for iOS (Paper and Fabric) (#35017)
Summary:
This adds Dynamic Type support in iOS as described [here](https://github.com/react-native-community/discussions-and-proposals/issues/519).

`Text` elements have a new prop, `dynamicTypeRamp`, that allows users to specify which font ramp a particular `Text` element should take on as the OS's accessibility setting for text size. The different types line up with different values of `UIFontTextStyle`. If not specified, we default to the current behavior.

~~For the moment, this change is only for Paper. I tried applying a corresponding change to Fabric by adding an additional field to [`facebook::react::TextAttributes`](https://github.com/facebook/react-native/blob/main/ReactCommon/react/renderer/attributedstring/TextAttributes.h) and changing [`RCTEffectiveFontSizeMultiplierFromTextAttributes`](afb124dcf0/ReactCommon/react/renderer/textlayoutmanager/platform/ios/RCTAttributedTextUtils.mm (L79-L84)) to use that new field, but in the process I discovered that this function doesn't seem to ever get called, hence [this bug](https://github.com/facebook/react-native/issues/34990).~~

## Changelog

[iOS] [Added] - Dynamic Type support

Pull Request resolved: https://github.com/facebook/react-native/pull/35017

Test Plan:
Validated with a test page in RNTester. Screenshots follow:

A) Default text size
B) Largest non-accessibility text size
C) Largest accessibility text size, split across two screenshots due to size

| A | B | C |
|-|-|-|
| ![Simulator Screen Shot - iPad (9th generation) - 2022-10-18 at 16 17 08](https://user-images.githubusercontent.com/717674/196562746-c8bbf53d-3c70-4e55-8600-0cfed8aacf5d.png) | ![Simulator Screen Shot - iPad (9th generation) - 2022-10-18 at 16 17 55](https://user-images.githubusercontent.com/717674/196563051-68bb0e34-c573-47ed-8c19-58ae45a7ce2b.png) | ![Simulator Screen Shot - iPad (9th generation) - 2022-10-18 at 16 18 33](https://user-images.githubusercontent.com/717674/196563185-61ede5ee-e79e-4af5-84a7-8f1e230a25f8.png) |
||| ![Simulator Screen Shot - iPad (9th generation) - 2022-10-18 at 16 18 42](https://user-images.githubusercontent.com/717674/196563208-2242efa2-5f24-466d-80f5-eb57a7678a67.png) |

Reviewed By: sammy-SC

Differential Revision: D40779346

Pulled By: NickGerleman

fbshipit-source-id: efc7a8e9810a93afc82c5def97af15a2e8453d90
2022-11-15 19:03:37 -08:00
Pieter De Baets effbae5f8c Rename rn_xplat_cxx_library2 to rn_apple_xplat_cxx_library
Summary:
Rename this helper to make it explicit what it's used for. There's still more to do here to simplify these.

Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D41184338

fbshipit-source-id: a33d306978cb9026ebf10b00853042da4aaecd5a
2022-11-15 09:14:09 -08:00
Robert Balicki f4098a5acc Fix broken bishop build
Summary:
* When I build the latest bishop (using buck), I get a failure and a suggestion:

```
Rule //fbobjc/Apps/Bishop:BishopPackage (//fbobjc/Apps/Bishop:BishopPlatform) FAILED because Command failed with exit code 1.

command: [/bin/bash, -e, /data/sandcastle/boxes/fbsource/buck-out/tmp/genrule-15268472800256890202.sh]

stderr: The target:  fbsource//fbobjc/Apps/Bishop:BishopShareExtension is an App Extension, and must only use APIs available in App Extensions. However, it contains dependencies that do not set 'extension_api_only = True' in their BUCK files:
 - //xplat/js/react-native-github:RCTSettingsApple

This command may be able automatically to fix this issue:
  arc buildozer 'set extension_api_only True' //xplat/js/react-native-github:RCTSettingsApple

```
* This diff is the result of running that command

Reviewed By: christophpurrer

Differential Revision: D41121880

fbshipit-source-id: b1ecd077270d7f3909739364237af32dbc617f52
2022-11-08 10:45:00 -08:00
Ruslan Shestopalyuk ea73a66936 Scaffolding for the PerformanceObserver TurboModule (C++ side) (#35226)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35226

Changelog: [Internal]

This adds scaffolding for the C++ side of NativePerformanceObserver module.

Thanks to christophpurrer for helping set this up, as this is the first one of this kind inside core/OSS.

Reviewed By: rubennorte

Differential Revision: D41028555

fbshipit-source-id: 4acf0e71a254a42044cbbe5f94f40938342c6aa2
2022-11-08 10:01:21 -08:00
Riccardo Cipolleschi ea1d72921d Back out "Oncall for BUCK project xplat/js/react-native-github/BUCK"
Summary:
Original commit changeset: 8f3e37917646

Original Phabricator Diff: D40460041 (dac6806559)

Reviewed By: GijsWeterings, arushikesarwani94

Differential Revision: D41119700

fbshipit-source-id: 5de6808a721efd0b9b765e52586155dd375c0fee
2022-11-08 08:02:09 -08:00
Stanley Shi dac6806559 Oncall for BUCK project xplat/js/react-native-github/BUCK (#35255)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/35255

Reviewed By: huntie, cipolleschi

Differential Revision: D40460041

fbshipit-source-id: 8f3e37917646e3571398faf04be317c149b7a0ec
2022-11-08 01:53:13 -08:00
Rick Hanlon b966d29724 Add back deprecated prop-types
Summary:
In 2017, React published v15.5 which extracted the built-in `prop types` to a separate package to reflect the fact that not everybody uses them. In 2018, React Native started to remove `PropTypes` from React Native for the same reason. In 0.68 React Native introduced a deprecation warning which notified users that the change was coming, and in 0.69 we removed the PropTypes entirely.

The feedback we've received from the community is that there has not been enough time to migrate libraries off of PropTypes. This has resulted in users needing to patch the React Native package `index.js` file directly to add back the PropTypes, instead of migrating off of them. We can empathize with this fix short term (it unblocks the upgrade) but long term this patch will cause users to miss important changes to `index.js`, and add a maintenance cost for users.

Part of the reason there was not enough time is that we didn't do a good job surfacing libraries that were using PropTypes. This means, when you got a deprecation warning, it wasn't clear where the source of the usage was (either in your code or in a library). So even if you wanted to migrate, it was difficult to know where to actually make the change.

In the next release, we've made it easier to find call sites using deprecated types by [fixing the code frame in errors](https://github.com/react-native-community/cli/pull/1699) reporting in LogBox, and ensuring that [the app doesn't crash without a warning](https://github.com/facebook/react-native/pull/34650). This should make it easier to identify exactly where the deprecated usage is, so you can migrate it.

To help users get off of the patch, and allow more time to migrate, we're walking back the removal of PropTypes, and keeping it as a deprecation for a couple more versions. We ask that you either migrate off PropTypes to a type system like TypeScript, or migrate to the `deprecated-react-native-prop-types` package.

Once we feel more confident that the community has migrated and will not need to patch React Native in order to fix this issue, we'll remove the PropTypes again. **If you have any trouble finding the source of the PropType usage, please file an issue so we can help track it down with you.**

Changelog:
[General][Changed] - Add back deprecated PropTypes

Reviewed By: yungsters

Differential Revision: D40725705

fbshipit-source-id: 8ce61be30343827efd6dc89a012eeef0b6676deb
2022-10-26 22:03:19 -07:00
Christoph Purrer d0599ac56b Back out "Add enum example to Android/iOS rn-tester TurboModule" (#35089)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/35089

Changelog:
[General][Fixed] - Back out "Add enum example to Android/iOS rn-tester TurboModule"

This broke the rn-tester adding due to an invalid flow-enum setup. Needs further investigation

Reviewed By: cipolleschi

Differential Revision: D40714320

fbshipit-source-id: 9831276762f90df0ffaca3304382fe5925009343
2022-10-26 06:30:14 -07:00
Christoph Purrer 02e4fcd825 Add enum example to Android/iOS rn-tester TurboModule
Summary:
Add enum example to Android/iOS rn-tester TurboModule

Changelog:
[General][Added] - Add enum example to Android/iOS rn-tester TurboModule

Reviewed By: javache

Differential Revision: D40619020

fbshipit-source-id: a113c5c78bcff3275e80d11bce8d0e6421b0b97d
2022-10-25 14:40:08 -07:00
Donald Webster 9a43e53a06 Revert D40613108: 4/n Display a RedBox with the JS stack (instead of native stack) when an unhandled JS exceptions occurs - Try 2
Differential Revision:
D40613108 (5449148482)

Original commit changeset: f36c3b39a216

Original Phabricator Diff: D40613108 (5449148482)

fbshipit-source-id: 079deac137610eeebd231bd97930efda6b284fff
2022-10-24 08:56:55 -07:00
Paige Sun 5449148482 4/n Display a RedBox with the JS stack (instead of native stack) when an unhandled JS exceptions occurs - Try 2
Summary:
Changelog: [iOS][Changed] Display a RedBox with the JS stack (instead of native stack) when an unhandled JS exceptions occurs

-----

# A0) Bridge mode, Unhandled Exception, FBiOS
Unhandled exception goes to FBReactModule, but the JS Stack is not parsed correctly.
https://www.internalfb.com/code/fbsource/[312d5cbdd7278247a84619786b12a44c4400fcc0]/fbobjc/Apps/Wilde/FBReactModule2/FBReactModuleAPI/FBReactModuleAPI/Exported/FBReactModule.mm?lines=1488%2C1493

See `****** FBReactModule handleFatalError` in the logs P539306390, and compare with correct behavior in (A1) in the Test Plan.

https://pxl.cl/2h6h3

{F782257996}

-----

# A) Before diff, rn-tester
Open to rn-tester -> APIs -> Crash Examples -> JS Crash.

Set `RCTParseUnhandledJSErrorStackNatively` to YES.
https://www.internalfb.com/code/fbsource/[98880e52ee78be3614e5d9a2ce3292f6a7b5e413]/xplat/js/react-native-github/React/Base/RCTConstants.m?lines=73

{F783395297}

----

build_on_commit[ios_fbios-arm64-dylibs-jackalope-iphoneos-production_build]

Reviewed By: RSNara

Differential Revision: D40613108

fbshipit-source-id: f36c3b39a2167402ee3730db8b40b53a0b80aa60
2022-10-23 16:42:00 -07:00
Jonathan Keljo e69e6f4014 supermodule:xplat/default/public.react_native.infra
Reviewed By: javache

Differential Revision: D40376280

fbshipit-source-id: d76e692fd8a571614729d0fb15ebde8895d3de28
2022-10-23 15:55:13 -07:00
Donald Webster 9e68eea2c8 Revert D40387938: 4/n Display a RedBox with the JS stack (instead of native stack) when an unhandled JS exceptions occurs
Differential Revision:
D40387938 (ff398e4e26)

Original commit changeset: 2abea657476d

Original Phabricator Diff: D40387938 (ff398e4e26)

fbshipit-source-id: 0b5dbe417abf25d5723c70337189dfb42570e56d
2022-10-21 12:59:54 -07:00
Paige Sun ff398e4e26 4/n Display a RedBox with the JS stack (instead of native stack) when an unhandled JS exceptions occurs
Summary:
Changelog: [iOS][Changed] Display a RedBox with the JS stack (instead of native stack) when an unhandled JS exceptions occurs

-----

# A0) Bridge mode, Unhandled Exception, FBiOS
Unhandled exception goes to FBReactModule, but the JS Stack is not parsed correctly.
https://www.internalfb.com/code/fbsource/[312d5cbdd7278247a84619786b12a44c4400fcc0]/fbobjc/Apps/Wilde/FBReactModule2/FBReactModuleAPI/FBReactModuleAPI/Exported/FBReactModule.mm?lines=1488%2C1493

See `****** FBReactModule handleFatalError` in the logs P539306390, and compare with correct behavior in (A1) in the Test Plan.

https://pxl.cl/2h6h3

{F782257996}

-----

# A) Before diff, rn-tester
Open to rn-tester -> APIs -> Crash Examples -> JS Crash.

Set `RCTParseUnhandledJSErrorStackNatively` to YES.
https://www.internalfb.com/code/fbsource/[98880e52ee78be3614e5d9a2ce3292f6a7b5e413]/xplat/js/react-native-github/React/Base/RCTConstants.m?lines=73

{F783395297}

Reviewed By: sammy-SC

Differential Revision: D40387938

fbshipit-source-id: 2abea657476d3bf61ad5b1c643f129e44c6f3f35
2022-10-20 21:12:41 -07:00
Samuel Susla a63a4fa7d2 React Native sync for revisions 0cac4d5...fd31724
Summary:
- **[9fb581c7c](https://github.com/facebook/react/commit/9fb581c7c )**: Refactor: merge duplicate imports ([#25489](https://github.com/facebook/react/pull/25489)) //<c0dedance>//
- **[bc358362a](https://github.com/facebook/react/commit/bc358362a )**: [Flight] Improve Error Messages when Invalid Object is Passed to Client/Host Components ([#25492](https://github.com/facebook/react/pull/25492)) //<Sebastian Markbåge>//
- **[780eacd40](https://github.com/facebook/react/commit/780eacd40 )**: Flow upgrade to 0.190 ([#25483](https://github.com/facebook/react/pull/25483)) //<Jan Kassens>//
- **[54f0e0f73](https://github.com/facebook/react/commit/54f0e0f73 )**: Scaffolding for react-dom/unstable_external-server-runtime ([#25482](https://github.com/facebook/react/pull/25482)) //<Andrew Clark>//
- **[0eaca3756](https://github.com/facebook/react/commit/0eaca3756 )**: Add script to generate inline Fizz runtime ([#25481](https://github.com/facebook/react/pull/25481)) //<Andrew Clark>//
- **[69c7246d9](https://github.com/facebook/react/commit/69c7246d9 )**: Initialize useMemoCache with sentinel values ([#25465](https://github.com/facebook/react/pull/25465)) //<Joseph Savona>//
- **[3b814327e](https://github.com/facebook/react/commit/3b814327e )**: Allow Async Functions to be used in Server Components ([#25479](https://github.com/facebook/react/pull/25479)) //<Sebastian Markbåge>//
- **[a6bf46689](https://github.com/facebook/react/commit/a6bf46689 )**: Extract Fizz instruction set to build macro ([#25457](https://github.com/facebook/react/pull/25457)) //<Andrew Clark>//
- **[ea5bc6bac](https://github.com/facebook/react/commit/ea5bc6bac )**: [React Native FB] dynamic feature flag for ref access warning ([#25471](https://github.com/facebook/react/pull/25471)) //<Jan Kassens>//
- **[08d035bc8](https://github.com/facebook/react/commit/08d035bc8 )**: Remove Shallow Renderer Tests ([#25475](https://github.com/facebook/react/pull/25475)) //<Sebastian Markbåge>//
- **[a8c16a004](https://github.com/facebook/react/commit/a8c16a004 )**: Split Cache into its own Dispatcher ([#25474](https://github.com/facebook/react/pull/25474)) //<Sebastian Markbåge>//
- **[2cf4352e1](https://github.com/facebook/react/commit/2cf4352e1 )**: Implement HostSingleton Fiber type ([#25426](https://github.com/facebook/react/pull/25426)) //<Josh Story>//
- **[aa9988e5e](https://github.com/facebook/react/commit/aa9988e5e )**: Server render fork for react-dom ([#25436](https://github.com/facebook/react/pull/25436)) //<Josh Story>//
- **[513417d69](https://github.com/facebook/react/commit/513417d69 )**: Return lastNonHostInstance in getInspectorDataForInstance for devtools ([#25441](https://github.com/facebook/react/pull/25441)) //<Tianyu Yao>//
- **[5d60a0b84](https://github.com/facebook/react/commit/5d60a0b84 )**: Bugfix: LegacyHidden shouldn't defer effects ([#25442](https://github.com/facebook/react/pull/25442)) //<Andrew Clark>//
- **[618388bc3](https://github.com/facebook/react/commit/618388bc3 )**: [Float] Support script preloads ([#25432](https://github.com/facebook/react/pull/25432)) //<Josh Story>//
- **[2872a26e1](https://github.com/facebook/react/commit/2872a26e1 )**: track resources in different roots separately ([#25388](https://github.com/facebook/react/pull/25388)) //<Josh Story>//
- **[ea04a486a](https://github.com/facebook/react/commit/ea04a486a )**: Flow: remove unused suppressions ([#25424](https://github.com/facebook/react/pull/25424)) //<Jan Kassens>//
- **[9813edef2](https://github.com/facebook/react/commit/9813edef2 )**: Flow upgrade to 0.188 //<Jan Kassens>//
- **[3b6826ed9](https://github.com/facebook/react/commit/3b6826ed9 )**: Flow: inference_mode=constrain_writes //<Jan Kassens>//
- **[aed33a49c](https://github.com/facebook/react/commit/aed33a49c )**: Flow upgrade to 0.185 //<Jan Kassens>//
- **[f02a5f5c7](https://github.com/facebook/react/commit/f02a5f5c7 )**: Flow upgrade to 0.182 //<Jan Kassens>//
- **[72593f008](https://github.com/facebook/react/commit/72593f008 )**: Flow upgrade to 0.176 //<Jan Kassens>//
- **[46d40f306](https://github.com/facebook/react/commit/46d40f306 )**: Flow upgrade to 0.175 //<Jan Kassens>//
- **[1089faf0d](https://github.com/facebook/react/commit/1089faf0d )**: Flow: run codemod to remove existential type //<Jan Kassens>//
- **[3fd9bd8e7](https://github.com/facebook/react/commit/3fd9bd8e7 )**: Add RulesOfHooks support for `use` //<Lauren Tan>//
- **[338e6a967](https://github.com/facebook/react/commit/338e6a967 )**: Flow upgrade to 0.155 //<Jan Kassens>//
- **[8bc95bb3c](https://github.com/facebook/react/commit/8bc95bb3c )**: Flow upgrade to 0.154 //<Jan Kassens>//
- **[9f8a98a39](https://github.com/facebook/react/commit/9f8a98a39 )**: Flow upgrade to 0.153 //<Jan Kassens>//
- **[64fe791be](https://github.com/facebook/react/commit/64fe791be )**: Flow upgrade to 0.146 //<Jan Kassens>//
- **[d3c6c16a0](https://github.com/facebook/react/commit/d3c6c16a0 )**: Flow upgrade to 0.145 //<Jan Kassens>//
- **[00a2f8150](https://github.com/facebook/react/commit/00a2f8150 )**: Flow upgrade to 0.143 //<Jan Kassens>//
- **[0a3072278](https://github.com/facebook/react/commit/0a3072278 )**: Flow: complete types first migration ([#25389](https://github.com/facebook/react/pull/25389)) //<Jan Kassens>//
- **[bcc05671f](https://github.com/facebook/react/commit/bcc05671f )**: Flow: types first in shared ([#25343](https://github.com/facebook/react/pull/25343)) //<Jan Kassens>//
- **[b1f34aa30](https://github.com/facebook/react/commit/b1f34aa30 )**: Flow: types first in react-native-renderer ([#25363](https://github.com/facebook/react/pull/25363)) //<Jan Kassens>//
- **[9143864ae](https://github.com/facebook/react/commit/9143864ae )**: Flow: well formed exports for smaller packages ([#25361](https://github.com/facebook/react/pull/25361)) //<Jan Kassens>//
- **[21a851e03](https://github.com/facebook/react/commit/21a851e03 )**: Fix devtools typos and grammar ([#24587](https://github.com/facebook/react/pull/24587)) //<Alexandru Tasica>//
- **[cfafeb685](https://github.com/facebook/react/commit/cfafeb685 )**: Remove extra space in Wedge.js ([#24611](https://github.com/facebook/react/pull/24611)) //<Kerim Büyükakyüz>//
- **[9c3de25e1](https://github.com/facebook/react/commit/9c3de25e1 )**: Flow: types first in reconciler ([#25362](https://github.com/facebook/react/pull/25362)) //<Jan Kassens>//
- **[7b25b961d](https://github.com/facebook/react/commit/7b25b961d )**: [Fizz/Float] Float for stylesheet resources ([#25243](https://github.com/facebook/react/pull/25243)) //<Josh Story>//
- **[4c016e7aa](https://github.com/facebook/react/commit/4c016e7aa )**: Refactor: use  property shorthand ([#25366](https://github.com/facebook/react/pull/25366)) //<zhangrenyang>//
- **[06066c1a5](https://github.com/facebook/react/commit/06066c1a5 )**: Make RulesOfHooks-test more consistent with ExhaustiveDeps-test //<Lauren Tan>//
- **[49ae0fad8](https://github.com/facebook/react/commit/49ae0fad8 )**: Fix RulesOfHooks test case indentation //<Lauren Tan>//
- **[abbbdf4ce](https://github.com/facebook/react/commit/abbbdf4ce )**: Put modern StrictMode behind a feature flag ([#25365](https://github.com/facebook/react/pull/25365)) //<Samuel Susla>//
- **[434110390](https://github.com/facebook/react/commit/434110390 )**: ReactHooks.js - delete emptyObject ([#25031](https://github.com/facebook/react/pull/25031)) //<Igor Berlenko>//
- **[31400ce29](https://github.com/facebook/react/commit/31400ce29 )**: Refactor: merge duplicate imports ([#25364](https://github.com/facebook/react/pull/25364)) //<jerry-lllman>//
- **[3517bd9f7](https://github.com/facebook/react/commit/3517bd9f7 )**: Refactor useEvent ([#25336](https://github.com/facebook/react/pull/25336)) //<Lauren Tan>//
- **[6cf06a929](https://github.com/facebook/react/commit/6cf06a929 )**: Remove outdated comments. ([#24464](https://github.com/facebook/react/pull/24464)) //<zhangenming>//
- **[20a257c25](https://github.com/facebook/react/commit/20a257c25 )**: Refactor: more word doubles removed ([#25352](https://github.com/facebook/react/pull/25352)) //<Vic Graf>//
- **[8cadcffd5](https://github.com/facebook/react/commit/8cadcffd5 )**: Fix typo: reconcilation -> reconciliation ([#25355](https://github.com/facebook/react/pull/25355)) //<zhangrenyang>//
- **[ebbe599a2](https://github.com/facebook/react/commit/ebbe599a2 )**: Fix EventListener fork ([#25347](https://github.com/facebook/react/pull/25347)) //<Sebastian Markbåge>//
- **[97d75c9c8](https://github.com/facebook/react/commit/97d75c9c8 )**: Move react-dom implementation files to react-dom-bindings ([#25345](https://github.com/facebook/react/pull/25345)) //<Sebastian Markbåge>//
- **[3de926449](https://github.com/facebook/react/commit/3de926449 )**: [Fizz] experimental_useEvent ([#25325](https://github.com/facebook/react/pull/25325)) //<dan>//
- **[5b59dd640](https://github.com/facebook/react/commit/5b59dd640 )**: Fix duplicate words tests ([#25333](https://github.com/facebook/react/pull/25333)) //<Vic Graf>//
- **[cb5084d1c](https://github.com/facebook/react/commit/cb5084d1c )**: [ESLint] Check useEvent references instead ([#25319](https://github.com/facebook/react/pull/25319)) //<Lauren Tan>//
- **[c89a83695](https://github.com/facebook/react/commit/c89a83695 )**: Update RulesOfHooks with useEvent rules ([#25285](https://github.com/facebook/react/pull/25285)) //<Lauren Tan>//
- **[efc6a08e9](https://github.com/facebook/react/commit/efc6a08e9 )**: [Flight] Implement error digests for Flight runtime and expose errorInfo in getDerivedStateFromError ([#25302](https://github.com/facebook/react/pull/25302)) //<Josh Story>//
- **[c1d414d75](https://github.com/facebook/react/commit/c1d414d75 )**: Add ref to Offscreen component ([#25254](https://github.com/facebook/react/pull/25254)) //<Samuel Susla>//
- **[135e33c95](https://github.com/facebook/react/commit/135e33c95 )**: Flow: typing of Scheduler ([#25317](https://github.com/facebook/react/pull/25317)) //<Jan Kassens>//
- **[cc8cb145f](https://github.com/facebook/react/commit/cc8cb145f )**: Flow: add some missing types in react-reconciler ([#25316](https://github.com/facebook/react/pull/25316)) //<Jan Kassens>//
- **[112d0498c](https://github.com/facebook/react/commit/112d0498c )**: [Fizz] Move digest from errorInfo to Error instance ([#25313](https://github.com/facebook/react/pull/25313)) //<Josh Story>//
- **[d1bb1c586](https://github.com/facebook/react/commit/d1bb1c586 )**: Fix memory leak after repeated setState bailouts ([#25309](https://github.com/facebook/react/pull/25309)) //<Andrew Clark>//

Changelog:
[General][Changed] - React Native sync for revisions 0cac4d5...9fb581c

jest_e2e[run_all_tests]

Reviewed By: yungsters

Differential Revision: D40383219

fbshipit-source-id: dc2a44bd05df041e0c7f2e1060640b1d2c372187
2022-10-17 09:52:15 -07:00
generatedunixname89002005287564 0fcce547dc supermodule:xplat/default/public.react_native.core
Reviewed By: GijsWeterings

Differential Revision: D40376221

fbshipit-source-id: fa5ff5ed3f053ce6958d7dd03d4f86cd88d86a11
2022-10-14 03:56:06 -07:00
Chenglin Liu a885b1fcfd Add link group label to talkios deps (#34949)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34949

Changelog: [Internal]

Currently, link groups depend on supermodules to generate. To continue supporting link groups while allowing us to migrate off supermodules, we'll add a talkios_link_group label on all talkios targets to persist the current hierarchical information.

Reviewed By: jkeljo

Differential Revision: D40268275

fbshipit-source-id: a82e969e7cb8ec167489be73dc9bc71cf8ec37e1
2022-10-11 20:05:05 -07:00
Chenglin Liu 065db683a2 add link group label to fbios deps
Summary:
Currently, fbios link groups depend on supermodules to generate. To continue supporting
link groups while allowing us to migrate off supermodules, we'll add a `fbios_link_group` label on all fbios targets to persist the current hierarchical information.

Reviewed By: jkeljo

Differential Revision: D39543862

fbshipit-source-id: 2abe5b3ee883e77336076d88436a1c84139b5a97
2022-09-22 22:52:22 -07:00
Paige Sun 4e70376dc7 Modularlize RCTBridgeModule.h 3/n - Move RCTTurboModuleRegistry.h to its own file in ReactInternal target (#34514)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34514

Changelog: [Internal][iOS] Modularlize RCTBridgeModule.h 3/n -  Move RCTTurboModuleRegistry.h to its own file in ReactInternal target

# Why clean up RCTBridgeModule.h?
Clean up one unnecessary import of RCTBridgeModule.h.

RCTBridgeModule includes a lot of header files, and this header is imported everywhere. The ultimate goal is that files (especially React Native infra files) should only import only what they need and not import the entirety of RCTBridgeModule.h whenever possible.

This way, certain headers that are Bridge-only can be compiled out of the new architecture with a flag.

Reviewed By: RSNara

Differential Revision: D38971168

fbshipit-source-id: 3b1b23d422f965a5a14bc4178d32b844906f2c8b
2022-09-09 15:10:14 -07:00
Paige Sun 5745c1df26 Modularlize RCTConstants.h - Move Bridge-only constants into a separate file
Summary:
Changelog: [Internal] Move Bridge-only constants into a separate file

- Move Bridge only constants from RCTBridge.h into  RCTBridgeConstants.h.
- Move shared constants from RCTBridge.h into RCTConstants.h.

This way, new architecture does not need to import RCTBridge.h just for the constants.

Reviewed By: sammy-SC

Differential Revision: D39085713

fbshipit-source-id: 40177cbed72a326b40ec448c98751d1dd3464504
2022-09-08 19:56:22 -07:00
Paige Sun 984ee76ea8 Modularlize RCTBridgeModule.h 2/n - Fix rn-tester CI breakage on RCTBundleManager.h (#34515)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/34515

Changelog: [Internal]

Reviewed By: mdvacca, GijsWeterings

Differential Revision: D39079572

fbshipit-source-id: 374114a02d8bd07b0ac514db46ee0270c505e82d
2022-08-27 07:08:30 -07:00
Paige Sun 4230de0f58 Modularlize RCTBridgeModule.h 1/n - Move RCTBundleManager.h to its own file in ReactInternal target
Summary:
Changelog: [Internal][iOS] Modularlize RCTBridgeModule.h 1/n -  Move RCTBundleManager.h to its own file in ReactInternal target

# Why clean up RCTBridgeModule.h?
Clean up one unnecessary import of RCTBridgeModule.h.

RCTBridgeModule includes a lot of header files, and this header is imported everywhere. The ultimate goal is that files (especially React Native infra files) should only import only what they need and not import the entirely of RCTBridgeModule.h whenever possible.

This way, certain headers that are Bridge-only can be compiled out of the new architecture with a flag.

The other benefit of splitting up the headers like this is that it'll be much easier for developers to navigate between the .h and .mm files.

Reviewed By: philIip

Differential Revision: D38943262

fbshipit-source-id: 90876324de9fae25bf33c7aef820a32d7c6ce2f8
2022-08-26 17:56:51 -07:00
Pieter De Baets 450fa4d1d3 Remove molly dep from react-native buck graph
Summary:
Folly's molly target combines a number of targets that are supposed to be useable on mobile. Since we're trying to move away from folly, we should instead list explicitly which parts of folly we're using so we can remove them over time, and track which targets no longer have any folly dependencies.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D38352060

fbshipit-source-id: 09d0d84793692f97f4d49390c99c38b23441df54
2022-08-11 04:53:34 -07:00
Chatura Atapattu a70354df12 Apply lint updates from buildifier in xplat
Summary:
In D37873933, we update the buildifier binaries, which apply some minor changes to existing lint. Specifically, entries are now properly sorted.

Update the files in xplat such that updating buildifier does not cause lint changes in users diffs.

drop-conflicts
allow_many_files
#nocancel
#forcetdhashing

(Note: this ignores all push blocking failures!)

Reviewed By: d16r

Differential Revision: D37873936

fbshipit-source-id: f31d9c50d64ae99f99298977b471bf13e7ed5262
2022-07-24 13:46:21 -07:00
Chatura Atapattu ee4ce2df2f Use an SDKRoot based Foundation framework
Summary:
When building `igios-no-extensions` with buck2 on linux, we the following analysis error:

```
When running analysis for `fbsource//fbobjc/Apps/Instagram/Instagram:InstagramNoExtensions (fbsource//tools/build_defs/config/platform/apple:Instagram-125ae32099392ce8)`

Caused by:
    0: When running analysis for `fbsource//fbobjc/Apps/Instagram/Instagram:InstagramARVRFrameworkDylibFramework (fbsource//tools/build_defs/config/platform/apple:Instagram-125ae32099392ce8)`
    1: When running analysis for `fbsource//fbobjc/Apps/Instagram/Instagram:InstagramDependencyPoolForLinkGroupsFramework (fbsource//tools/build_defs/config/platform/apple:Instagram-125ae32099392ce8)`
    2: When running analysis for `fbsource//fbobjc/Libraries/FBReactKit:RCTNetInfo (fbsource//tools/build_defs/config/platform/apple:Instagram-125ae32099392ce8)`
    3: When running analysis for `fbsource//xplat/js/RKJSModules/Libraries/NetInfo:FBReactNativeNetInfoSpecApple (fbsource//tools/build_defs/config/platform/apple:Instagram-125ae32099392ce8)`
    4: When running analysis for `fbsource//xplat/js/react-native-github:RCTTypeSafety (fbsource//tools/build_defs/config/platform/apple:Instagram-125ae32099392ce8)`
    5: Traceback (most recent call last):
         * fbcode/buck2/prelude/apple/apple_library.bzl:48, in <module>
             constructor_params, swift_providers = apple_library_rule_constructor_params_a...
         * fbcode/buck2/prelude/apple/apple_library.bzl:111, in apple_library_rule_constructor_params_and_swift_providers
             args = [cmd_args(get_framework_search_path_flags(ctx))],
         * fbcode/buck2/prelude/apple/apple_frameworks.bzl:46, in get_framework_search_path_flags
             return _get_framework_search_path_flags(_get_non_sdk_framework_directories(ct...
         * fbcode/buck2/prelude/apple/apple_frameworks.bzl:59, in _get_non_sdk_framework_directories
             return dedupe(filter(None, [_non_sdk_framework_directory(ctx, x) for x in fra...
         * fbcode/buck2/prelude/apple/apple_frameworks.bzl:95, in _non_sdk_framework_directory
             expanded_framework_path = _expand_sdk_framework_path(ctx, framework_path)
         * fbcode/buck2/prelude/apple/apple_frameworks.bzl:81, in _expand_sdk_framework_path
             expanded_path = expanded_path.replace(path_variable, path_value)
       error: Type of parameter `new` doesn't match, expected `str`, actual `artifact`
         --> fbcode/buck2/prelude/apple/apple_frameworks.bzl:81:25
          |
       81 |         expanded_path = expanded_path.replace(path_variable, path_value)
          |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          |
```

This is related to running on Linux with buck2 and how we get the framework paths for linux/pika toolchains for non SDK frameworks. However, Foundation is an SDK framework, and updating it to be as such allows us to build, both with buck1 and buck2.

Differential Revision: D38080376

fbshipit-source-id: b226c3511e3312d0bf0ddb792dbe4ca99768cad1
2022-07-22 15:19:12 -07:00
Eric Edouard 8993ffc82e Added border curve style prop ("Squircle" effect - iOS only) (#33783)
Summary:
<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->
NOTE: PR is based on https://github.com/facebook/react-native/pull/32017 which went stale for quite a long time but can now safely be closed

![](https://preview.redd.it/nuvl4746ys471.png?width=960&crop=smart&auto=webp&s=084a517a645364ac246b70b7fa8e0f2470cc7af3)

Since iOS 13+, it is possible to change the corner curve property on iOS in order to smoothen border radius and make it more "rounded" (also called "squircle")
Here's an [article](https://medium.com/arthurofbabylon/a-smooth-corner-radius-in-ios-54b80aa2d372) explaining in details what it is.
This property is also built in figma, but currently there is no way to implement this directly with react-native despite it being available natively on iOS.

Many open source react-native libraries were created in order to simulate this behaviour:
[react-native-super-ellipse-mask](https://github.com/everdrone/react-native-super-ellipse-mask)
[react-native-squircle-view](https://github.com/everdrone/react-native-squircle-view)
[react-native-figma-squircle](https://github.com/tienphaw/react-native-figma-squircle)

But they rely on creating an SVG shape with the smoothed corners and masking the view behind. This makes it not very performant (flickering on mounting was a common side-effect)

This PR aims at implementing the property natively.

PR for the docs update: https://github.com/facebook/react-native-website/pull/2785

## Changelog

<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->

[iOS] [Added] - Added `borderCurve` style prop for smooth border radius (squircle effect)

Pull Request resolved: https://github.com/facebook/react-native/pull/33783

Test Plan:
We used the RNTester app and added an example with `cornerCurve ` set to `'continuous'` (only on iOS).

As the difference is quite subtle, we also made some more tests to better illustrate the difference (these are not in the RN-tester app):

![IMG_0810](https://user-images.githubusercontent.com/19872411/133893536-26207c53-aade-4583-9eef-7a1739b6907b.PNG)

We overlapped two views with `position: absolute`, the one in the background has a red background and has `cornerRadius` set to `false`, and the one in the foreground is set to `true`. We can clearly see where the borders differs on the corners.

Reviewed By: sammy-SC

Differential Revision: D37883631

Pulled By: cipolleschi

fbshipit-source-id: 09f06de9628fa326323eba63875de30102c4a59e
2022-07-21 04:11:30 -07:00
Dustin Shahidehpour cf2e27c388 Remove APPLETVOS variants from targets.
Summary:
After D37553813, there are no more TV apps in `fbsource`. Thus, we can begin the sequential teardown of all of the `APPLETVOS` variants in the codebase, which should migrating to `select()` and buck parse times a bit faster.

#nocancel

Reviewed By: natestedman

Differential Revision: D37594789

fbshipit-source-id: 830e40266654f948f39f5d10c32a080e970cf9d7
2022-07-05 17:50:10 -07:00
Rick Hanlon 118cf68914 React Native sync for revisions bd4784c...d300ceb
Summary:
This sync includes the following changes:
- **[dd4950c90](https://github.com/facebook/react/commit/dd4950c90 )**: [Flight] Implement useId hook ([#24172](https://github.com/facebook/react/pull/24172)) //<Josh Story>//
- **[26a5b3c7f](https://github.com/facebook/react/commit/26a5b3c7f )**: Explicitly set `highWaterMark` to 0 for `ReadableStream` ([#24641](https://github.com/facebook/react/pull/24641)) //<Josh Larson>//
- **[aec575914](https://github.com/facebook/react/commit/aec575914 )**: [Fizz] Send errors down to client ([#24551](https://github.com/facebook/react/pull/24551)) //<Josh Story>//
- **[a2766387e](https://github.com/facebook/react/commit/a2766387e )**: [Fizz] Improve text separator byte efficiency ([#24630](https://github.com/facebook/react/pull/24630)) //<Josh Story>//
- **[f7860538a](https://github.com/facebook/react/commit/f7860538a )**: Fix typo in useSyncExternalStore main entry point error ([#24631](https://github.com/facebook/react/pull/24631)) //<François Chalifour>//
- **[1bed20731](https://github.com/facebook/react/commit/1bed20731 )**: Add a module map option to the Webpack Flight Client ([#24629](https://github.com/facebook/react/pull/24629)) //<Sebastian Markbåge>//
- **[b2763d3ea](https://github.com/facebook/react/commit/b2763d3ea )**: Move hydration code out of normal Suspense path ([#24532](https://github.com/facebook/react/pull/24532)) //<Andrew Clark>//
- **[357a61324](https://github.com/facebook/react/commit/357a61324 )**: [DevTools][Transition Tracing] Added support for Suspense Boundaries ([#23365](https://github.com/facebook/react/pull/23365)) //<Luna Ruan>//
- **[2c8a1452b](https://github.com/facebook/react/commit/2c8a1452b )**: Fix ignored setState in Safari when iframe is touched ([#24459](https://github.com/facebook/react/pull/24459)) //<dan>//
- **[62662633d](https://github.com/facebook/react/commit/62662633d )**: Remove enableFlipOffscreenUnhideOrder ([#24545](https://github.com/facebook/react/pull/24545)) //<Ricky>//
- **[34da5aa69](https://github.com/facebook/react/commit/34da5aa69 )**: Only treat updates to lazy as a new mount in legacy mode ([#24530](https://github.com/facebook/react/pull/24530)) //<Ricky>//
- **[46a6d77e3](https://github.com/facebook/react/commit/46a6d77e3 )**: Unify JSResourceReference Interfaces ([#24507](https://github.com/facebook/react/pull/24507)) //<Timothy Yung>//
- **[6cbf0f7fa](https://github.com/facebook/react/commit/6cbf0f7fa )**: Fork ReactSymbols ([#24484](https://github.com/facebook/react/pull/24484)) //<Ricky>//
- **[a10a9a6b5](https://github.com/facebook/react/commit/a10a9a6b5 )**: Add test for hiding children after layout destroy ([#24483](https://github.com/facebook/react/pull/24483)) //<Ricky>//
- **[b4eb0ad71](https://github.com/facebook/react/commit/b4eb0ad71 )**: Do not replay erroring beginWork with invokeGuardedCallback when suspended or previously errored ([#24480](https://github.com/facebook/react/pull/24480)) //<Josh Story>//
- **[99eef9e2d](https://github.com/facebook/react/commit/99eef9e2d )**: Hide children of Offscreen after destroy effects ([#24446](https://github.com/facebook/react/pull/24446)) //<Ricky>//
- **[ce1386028](https://github.com/facebook/react/commit/ce1386028 )**: Remove enablePersistentOffscreenHostContainer flag ([#24460](https://github.com/facebook/react/pull/24460)) //<Andrew Clark>//
- **[72b7462fe](https://github.com/facebook/react/commit/72b7462fe )**: Bump local package.json versions for 18.1 release ([#24447](https://github.com/facebook/react/pull/24447)) //<Andrew Clark>//
- **[22edb9f77](https://github.com/facebook/react/commit/22edb9f77 )**: React `version` field should match package.json ([#24445](https://github.com/facebook/react/pull/24445)) //<Andrew Clark>//
- **[6bf3deef5](https://github.com/facebook/react/commit/6bf3deef5 )**: Upgrade react-shallow-renderer to support react 18 ([#24442](https://github.com/facebook/react/pull/24442)) //<Michael サイトー 中村 Bashurov>//

Changelog:
[General][Changed] - React Native sync for revisions bd4784c...d300ceb

jest_e2e[run_all_tests]

Reviewed By: cortinico, kacieb

Differential Revision: D36874368

fbshipit-source-id: c0ee015f4ef2fa56e57f7a1f6bc37dd05c949877
2022-06-06 10:58:29 -07:00
Shubho Sadhu 39e81a1703 Revert D36707915: Create Apple MSYS Mailbox Provider TurboModule
Differential Revision:
D36707915 (528414cc89)

Original commit changeset: 9a246f238efd

Original Phabricator Diff: D36707915 (528414cc89)

fbshipit-source-id: a581b745abd781a97d5ffde303db69ba3e23c51c
2022-06-02 19:36:46 -07:00
Jake Holland 528414cc89 Create Apple MSYS Mailbox Provider TurboModule
Summary: Creates a base TurboModule for Catalyst.

Reviewed By: ann-ss

Differential Revision: D36707915

fbshipit-source-id: 9a246f238efdcdde45e0332f7b868478deadf50e
2022-06-02 16:41:12 -07:00
Moti Zilberman 55a1cfedc5 Exclude *._reactvr.js from Buck
Summary: Changelog: [Internal]

Reviewed By: GijsWeterings

Differential Revision: D36805013

fbshipit-source-id: c8c0fafe2a60e4d5f21e99b1c34bcc2b45d302d9
2022-06-01 06:27:57 -07:00
Michael Lee (Engineering) 2d66bd4851 Rename the folly `headers_only` target to warn
Summary:
This target is not a good idea for a number of reasons:
1. It groups up multiple targets which breaks the dependency graph
2. It does not handle dependency remapping correctly
3. It has no mirror into fbcode

We should warn people this is a bad idea

Reviewed By: alexmalyshev

Differential Revision: D36519357

fbshipit-source-id: d60ca3237c7710118732578fecd1b2fc8903321b
2022-05-26 08:17:27 -07:00
Rick Hanlon 93b50be8c2 Replace use-subscripton with use-sync-external-store (#33770)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33770

React has replaced use-subscription with the React 18 compatible use-sync-external-store.

Changelog:
[General][Changed] - Replace use-subscripton with use-sync-external-store

Reviewed By: ryancat

Differential Revision: D35592432

fbshipit-source-id: cc2016f66940e53f3614e110bafb02240bae1ae4
2022-05-05 19:58:19 -07:00
Chris Olszewski daa105aba5 Fixup typo in pfh labels
Summary:
Now that the PFH node has been renamed this updates the pfh label.

Produced via `xbgs -l -e '"pfh:ReactNative_CommonInfrastructurePlaceholde"' | xargs sed -i 's/"pfh:ReactNative_CommonInfrastructurePlaceholde"/"pfh:ReactNative_CommonInfrastructurePlaceholder"/'`

Reviewed By: jkeljo

Differential Revision: D35374087

fbshipit-source-id: 61590f69de5a69ec3b8a0478f6dd43409de3c70b
2022-04-05 12:15:05 -07:00
Chris Olszewski ceae48c0f7 Add pfh labels to targets
Summary:
While it would be better to be able to do all of the ownership metadata at the Buck macro level, that proved to be more work than expected.

This diff adds the corresponding pfh label to all targets in `xplat/js/react-native-github` that have a Supermodule label. Once the migration is complete the Supermodules labels will be able to be removed.

Reviewed By: cortinico

Differential Revision: D35221544

fbshipit-source-id: d87d5e266dfb5e6ee087251dc34dff5db299bbaf
2022-03-30 14:37:03 -07:00
Wei Han 0353852297 fix //xplat/js/react-native-github:codegen_rn_components_schema_rncore (#33518)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33518

Changelog: [Internal]

When building with buck2, `setup_env_vars.sh` cannot be found. exporting setup_env_vars.sh and adding it as a dep to `write_to_json` fixes it.

Reviewed By: d16r

Differential Revision: D35188154

fbshipit-source-id: e1e1be4c83a57e443a181efaf1af3e6c8e6452f9
2022-03-30 14:12:50 -07:00
Paige Sun 6ee70a9cae 5/n Allow CKComponents to embed Fabric surfaces
Summary:
Changelog: [Fabric][iOS] Allow CKComponents to embed Fabric surfaces too.

Previously RCTSurfaceHostingComponent, a CKComponent, could only initialize the legacy RCTSurface. Now it can initialize RCTFabricSurface too, when a RCTSurfacePresenter is passed in.

Reviewed By: RSNara

Differential Revision: D35163595

fbshipit-source-id: e11a9334b0282e0728a38cc1c96de48a694e9e3d
2022-03-29 11:52:49 -07:00
Genki Kondo c231d5e371 VirtualizedList optimization - memoize FlatList._renderer
Summary:
Problem:
All CellRenderers rerender every time the containing VirtualizedList is rerendered. This is due to the following:
- Lambda is created for each CellRenderer's onLayout prop on every VirtualizedList render (fixed in D35061321 (19cf70266e))
- CellRenderer's parentProps prop changes on every VirtualizedList render (fixed in D35062323 (adb2962fee))
- FlatList recreates renderItem/ListItemComponent in FlatList._renderer (addressed in this diff)

Changelog:
[Internal] - VirtualizedList optimization - memoize FlatList._renderer

Reviewed By: ryancat

Differential Revision: D35067472

fbshipit-source-id: 124629d94821f35b8943730839fbe72f547e80fd
2022-03-24 13:14:37 -07:00
Paige Sun 6e03945c7f Use @synthesize viewRegistry_DEPRECATED for Keyframes to remove RCTWeakViewHolder hack
Summary:
Changelog: [iOS][Internal] Use synthesize viewRegistry_DEPRECATED for Keyframes to remove RCTWeakViewHolder

Remove the `RCTWeakViewHolder` hack, since it can be replaced with `viewRegistry_DEPRECATED viewForReactTag`.

Reviewed By: RSNara

Differential Revision: D34468082

fbshipit-source-id: be41ed2df6ee195409724f6069fd99a793dca01a
2022-02-25 13:45:22 -08:00