Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6211

Property 'ref' does not exist on type AnimatedProps React Native 0.62

$
0
0

Since migrating to react-native 0.62 I get the following error for Animated.View and all the Animated.Components or components created using createAnimatedComponent():

Property 'ref' does not exist on type 'IntrinsicAttributes & AnimatedProps<ViewProps> & { children?: ReactNode; }'

Example :

<>    {/*Working*/}}<View ref={(ref) => console.log('Ref', ref)} />    {/*Throwing error */}<Animated.View ref={(ref) => console.log('RefAnimated', ref)} /></>

This happens with a bare project using https://github.com/react-native-community/react-native-template-typescript

My relevant dependencies :

"react": "16.11.0","react-native": "0.62.0""@types/react-native": "^0.62.0","typescript": "^3.8.3"

Probably relevant React-Native commit : https://github.com/facebook/react-native/commit/66e72bb4e00aafbcb9f450ed5db261d98f99f82a

Any idea how to bypass this for now ?


Viewing all articles
Browse latest Browse all 6211

Trending Articles