Commit Graph

2 Commits

Author SHA1 Message Date
Moti Zilberman 6c6dbf63de Add @flow and @format to NativeComponentRegistryUnstable
Summary:
Changelog: [Internal]

`NativeComponentRegistryUnstable.js` has Flow syntax but no `flow` directive. It seems to typecheck fine so I'm adding the directive here. (Plus `format` for good measure.)

Reviewed By: huntie

Differential Revision: D41547266

fbshipit-source-id: 1b6a03c705add91843633166a245d0447a21af6d
2022-11-28 07:17:33 -08:00
Paige Sun a620d7dc85 4/5 Minor: Move unstable_hasComponent out of NativeComponentRegistry
Summary:
Without moving this, we would get this warning about a require cycle on the next diff, because DummyUIManager and LazyUIManager both need unstable_hasComponent.

```
(NOBRIDGE) WARN  Require cycle: react-native-github/Libraries/NativeComponent/NativeComponentRegistry.js -> react-native-github/Libraries/ReactNative/UIManager.js -> react-native-github/Libraries/ReactNative/DummyUIManager.js -> react-native-github/Libraries/NativeComponent/NativeComponentRegistry.js

Require cycles are allowed, but can result in uninitialized values. Consider refactoring to remove the need for a cycle.
```

Changelog: [Internal]

Reviewed By: philIip, RSNara

Differential Revision: D33511566

fbshipit-source-id: fd8c9732408d08ab17335273f86168bf30747929
2022-01-10 17:26:37 -08:00