Commit Graph

7 Commits

Author SHA1 Message Date
Tim Yung 1bf167ce97 RN: Prefer Destructured Import for useRef (#51404)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51404

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74893440

fbshipit-source-id: 9032f1e867a34b9cfa808f920a38f2630046eed7
2025-05-16 16:33:18 -07:00
Tim Yung 00108a1ac3 RN: Prefer Destructured Import for useState (#51403)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/51403

Prefers using this as a destructured import instead of as a member expression of `React`.

Changelog:
[Internal]

Reviewed By: SamChou19815

Differential Revision: D74891875

fbshipit-source-id: 981e85b5da84950c9e66e8d6b6496019e536711d
2025-05-16 16:33:18 -07:00
Gijs Weterings f4ec8cbdba Add rntester_android as a valid app in ReactNativeCoreE2ESetup
Summary: Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D54662740

fbshipit-source-id: f845b127dc1cf5ef509eebea29c1c495a9ceb763
2024-05-29 07:06:19 -07:00
Mike Vitousek 8c2a4d0d26 Annotate React hooks in xplat, defaulting to any
Summary:
Add explicit annotations to React hook callbacks as required for Flow's Local Type Inference project. This codemod prepares the codebase to match Flow's new typechecking algorithm. The new algorithm will make Flow more reliable and predictable.

This diff adds `any` or `$FlowFixMe` in cases where more precise types could not be determined.

Details:
- Codemod script: `.facebook/flowd codemod annotate-react-hooks ../../xplat/js --default-any --write`
- Local Type Inference announcement: [post](https://fb.workplace.com/groups/flowlang/posts/788206301785035)
- Support group: [Flow Support](https://fb.workplace.com/groups/flow)

drop-conflicts
bypass-lint

Reviewed By: SamChou19815

Differential Revision: D41231214

fbshipit-source-id: d5f5ce8d61020baa1138292c9e9f1c69dffd324c
2022-11-11 17:04:38 -08:00
Andres Suarez 8bd3edec88 Update copyright headers from Facebook to Meta
Reviewed By: aaronabramov

Differential Revision: D33367752

fbshipit-source-id: 4ce94d184485e5ee0a62cf67ad2d3ba16e285c8f
2021-12-30 15:11:21 -08:00
Evan Yeung 037e346197 Add LTI annotations to xplat/js
Summary:
This diff runs the codemod to add type annotations to function parameters in preparation for Flow's local type inference (LTI) project. I ran the codemod over xplat/js and reverted any files that had flow errors in them. See the list of commands run to see the regeneration of various files.

Changelog:
[Internal][Changed] - Added type annotations

Reviewed By: yungsters

Differential Revision: D32075270

fbshipit-source-id: 6a9cd85aab120b4d9e690bac142a415525dbf298
2021-11-10 15:40:15 -08:00
Kacie Bawiec 40a93914c6 Move Pressable Sticky Header Example to RNTester
Summary:
Add a test case showing off a pressable sticky header to RNTester.

Note that this test case does not follow the styling of the other ScrollView Examples. I chose not to make it follow the styling because the existing examples need to be refactored later to not use custom buttons.

Changelog:
[General][Added] Add Pressable Sticky Header example to ScrollViewExamples in RNTester

Reviewed By: lunaleaps

Differential Revision: D29437827

fbshipit-source-id: 3ccee5df99bc6f00a04e1ecbd47fbe86b1eda4dc
2021-06-30 15:44:31 -07:00