Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions docs/strict-typescript-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof View>` pattern which works as expected for both class and function components, e.g.:

```ts title=""
const ref = useRef<React.ComponentRef<typeof View>>(null);
```

## Other breaking changes

### Changes to Animated types
Expand Down
21 changes: 0 additions & 21 deletions website/versioned_docs/version-0.85/strict-typescript-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<typeof View>` pattern which works as expected for both class and function components, e.g.:

```ts title=""
const ref = useRef<React.ComponentRef<typeof View>>(null);
```

## Other breaking changes

### Changes to Animated types
Expand Down