question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[ts] Property 'ref' does not exist on type 'RenderableProps<IProps>'

See original GitHub issue

In 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:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
marvinhagemeistercommented, Apr 27, 2018
0reactions
marvinhagemeistercommented, May 1, 2018

@nhardy works fine for me with preact 8.2.9. Can you post an example of your code?

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found