From 40bcec6edd62ea3f48b7e8024e1fcc584be948ba Mon Sep 17 00:00:00 2001 From: Alex Hunt Date: Sun, 3 May 2026 17:32:38 +0100 Subject: [PATCH] [docs] Remove useRef workaround from Strict API migration guide To align with incoming fix in https://github.com/facebook/react-native/pull/56673. --- docs/strict-typescript-api.md | 21 ------------------- .../version-0.85/strict-typescript-api.md | 21 ------------------- 2 files changed, 42 deletions(-) diff --git a/docs/strict-typescript-api.md b/docs/strict-typescript-api.md index a426511835b..5c2a39894f0 100644 --- a/docs/strict-typescript-api.md +++ b/docs/strict-typescript-api.md @@ -145,27 +145,6 @@ The following APIs were previously named as `*Static` plus a variable declaratio - `SettingsStatic` - `VibrationStatic` -### Some core components are now function components instead of class components - -- `View` -- `Image` -- `TextInput` -- `Modal` -- `Text` -- `TouchableWithoutFeedback` -- `Switch` -- `ActivityIndicator` -- `ProgressBarAndroid` -- `InputAccessoryView` -- `Button` -- `SafeAreaView` - -Due to this change, accessing ref types of these views requires using `React.ComponentRef` pattern which works as expected for both class and function components, e.g.: - -```ts title="" -const ref = useRef>(null); -``` - ## Other breaking changes ### Changes to Animated types diff --git a/website/versioned_docs/version-0.85/strict-typescript-api.md b/website/versioned_docs/version-0.85/strict-typescript-api.md index a426511835b..5c2a39894f0 100644 --- a/website/versioned_docs/version-0.85/strict-typescript-api.md +++ b/website/versioned_docs/version-0.85/strict-typescript-api.md @@ -145,27 +145,6 @@ The following APIs were previously named as `*Static` plus a variable declaratio - `SettingsStatic` - `VibrationStatic` -### Some core components are now function components instead of class components - -- `View` -- `Image` -- `TextInput` -- `Modal` -- `Text` -- `TouchableWithoutFeedback` -- `Switch` -- `ActivityIndicator` -- `ProgressBarAndroid` -- `InputAccessoryView` -- `Button` -- `SafeAreaView` - -Due to this change, accessing ref types of these views requires using `React.ComponentRef` pattern which works as expected for both class and function components, e.g.: - -```ts title="" -const ref = useRef>(null); -``` - ## Other breaking changes ### Changes to Animated types