how to typify ref?
In your demo I see this typing ref
What is the ComponentRef?
I don't understand how I can do typing :(
It's a React type, it's used to make a typed reference of PrismaZoom. In a few lines below, you can see that calling methods like zoomOut is completely understood by Typescript.
@sylvaindubus I have "typescript": "~5.1.3" and "react": "16.14.0" and I can't export ComponentRef from React. I can't find anything about the ComponentRef in the React documentation
@cheechoo28 Well, I am using react 17.0.2 and it really exists, but I couldn't find any documentation around it either. :( Anyway, it's the only way I've found to correctly type this ref including bounded methods.