ridvanaltun / react-native-deepar

Snapchat-like filters, AR lenses, and real-time facial animations.
https://deepar.ai
MIT License
127 stars 17 forks source link

Error: Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref #14

Closed geniushkg closed 2 years ago

geniushkg commented 2 years ago

I just followed steps mentioned in Readme file but cant move forward from here

return (

Camera Homescreen { // .. }} />
);

I am not able to get deepar view work ,whenever i add this to return funtion of react native component always throw error like function components cannot have string refs
ridvanaltun commented 2 years ago

Hi @geniushkg, Can you show me the whole code?

geniushkg commented 2 years ago

Hi Resolved it by removing typescript refrence ,

for Vanilla JS ***** const DeepARRef = useRef(null);

this works and string ref error is also removed , I think it was occuring due to this line -> const deepARRef = useRef(null);

But I am not using typescript .