Emotion: [v11] @emotion/native types are based on old react-native types.

Created on 6 Feb 2020  路  3Comments  路  Source: emotion-js/emotion

Current behavior:

Both ActivityIndicatorIOS and WebView are included in the Pick from @types/[email protected].
Both of which seems to be gone in the latest version of @types/react-native@^0.61.10

I'm getting:
Type '"ActivityIndicatorIOS"' is not assignable to type '"ActivityIndicator" | "Button" | "DatePickerIOS" | "DrawerLayoutAndroid" | "FlatList" | "Image" | "ImageBackground" | "KeyboardAvoidingView" | "ListView" | "Modal" | "NavigatorIOS" | ... 147 more ... | "ViewPropTypes"'.

To reproduce:

Compile TypeScript-project that uses the types and a newer version of react-native.

Expected behavior:

I would expect to be able to use the latest version of react-native (and @types/react-native).

Environment information:

bug needs triage

All 3 comments

Feel free to open a PR to fix this.

cc @patsissons , i guess there is really no way to support a wide range of RN versions, right? So we should just stick to supporting latest

I think I just aligned with whatever was being used in the native package at the time.

Was this page helpful?
0 / 5 - 0 ratings