Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[@types/react-native] Property 'ref' does not exist on type AnimatedProps #43478

Closed
3 tasks done
ovy9086 opened this issue Mar 30, 2020 · 1 comment
Closed
3 tasks done

Comments

@ovy9086
Copy link

ovy9086 commented Mar 30, 2020

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 : facebook/react-native@66e72bb

@alloy
Copy link
Collaborator

alloy commented Mar 30, 2020

Duplicate of #42806

@alloy alloy marked this as a duplicate of #42806 Mar 30, 2020
@alloy alloy closed this as completed Mar 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants