[ts] Property 'ref' does not exist on type 'RenderableProps<IProps>'
See original GitHub issueIn the latest release 8.2.8 (which I understand is broken at this time), it seems like some typings are also broken.
When using refs in JSX, TypeScript complains with [ts] Property 'ref' does not exist on type 'RenderableProps<IProps>'.
E.g.
<MyComponent ref={(ref: MyComponent) => (this.myComponent = ref)} />
Issue Analytics
- State:
- Created 5 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Generics error with forwardRef: Property 'ref' does not exist ...
So the main problem here is that you're returning the result of React.forwardRef in your render, which isn't a valid return type for...
Read more >[TypeScript] Property 'ref' does not exist on type · Issue #798
I found a bug I want to propose a feature [TypeScript] After updating get type error: Type '{ children: ({ getRootProps, getInputProps, ....
Read more >Property 'ref' does not exist on type 'IntrinsicAttributes'-Reactjs
So the main problem here is that you're returning the result of React.forwardRef in your render, which isn't a valid return type for...
Read more >property ref does not exist on type intrinsicattributes
So the main problem here is that you're returning the result of React.forwardRef in your render, which isn't a valid return type for...
Read more >React ForwardRef TypeScript and current showing syntax ...
Currently getting the error "Property 'current' does not exist on type 'ForwardedRef<MutableRefObject<any>>'." I am trying to rack my brain ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Related: https://github.com/developit/preact/pull/1051
@nhardy works fine for me with preact
8.2.9
. Can you post an example of your code?