Skip to content

Commit 40bcec6

Browse files
committed
[docs] Remove useRef workaround from Strict API migration guide
To align with incoming fix in react/react-native#56673.
1 parent fcb433e commit 40bcec6

2 files changed

Lines changed: 0 additions & 42 deletions

File tree

docs/strict-typescript-api.md

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -145,27 +145,6 @@ The following APIs were previously named as `*Static` plus a variable declaratio
145145
- `SettingsStatic`
146146
- `VibrationStatic`
147147

148-
### Some core components are now function components instead of class components
149-
150-
- `View`
151-
- `Image`
152-
- `TextInput`
153-
- `Modal`
154-
- `Text`
155-
- `TouchableWithoutFeedback`
156-
- `Switch`
157-
- `ActivityIndicator`
158-
- `ProgressBarAndroid`
159-
- `InputAccessoryView`
160-
- `Button`
161-
- `SafeAreaView`
162-
163-
Due to this change, accessing ref types of these views requires using `React.ComponentRef<typeof View>` pattern which works as expected for both class and function components, e.g.:
164-
165-
```ts title=""
166-
const ref = useRef<React.ComponentRef<typeof View>>(null);
167-
```
168-
169148
## Other breaking changes
170149

171150
### Changes to Animated types

website/versioned_docs/version-0.85/strict-typescript-api.md

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -145,27 +145,6 @@ The following APIs were previously named as `*Static` plus a variable declaratio
145145
- `SettingsStatic`
146146
- `VibrationStatic`
147147

148-
### Some core components are now function components instead of class components
149-
150-
- `View`
151-
- `Image`
152-
- `TextInput`
153-
- `Modal`
154-
- `Text`
155-
- `TouchableWithoutFeedback`
156-
- `Switch`
157-
- `ActivityIndicator`
158-
- `ProgressBarAndroid`
159-
- `InputAccessoryView`
160-
- `Button`
161-
- `SafeAreaView`
162-
163-
Due to this change, accessing ref types of these views requires using `React.ComponentRef<typeof View>` pattern which works as expected for both class and function components, e.g.:
164-
165-
```ts title=""
166-
const ref = useRef<React.ComponentRef<typeof View>>(null);
167-
```
168-
169148
## Other breaking changes
170149

171150
### Changes to Animated types

0 commit comments

Comments
 (0)