Refs cannot be passed to render props #42
yepitschunked
started this conversation in
Something went wrong
Replies: 2 comments 2 replies
-
Nice, I think this is a simplified version of my repro here: #32 |
Beta Was this translation helpful? Give feedback.
0 replies
-
This has been reported several times and there is an open issue about: Currently, it's totally fine to disable eslint rule for this line 🙂 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Playground link
The compiler/lint rule complains with
InvalidReact: Ref values (the
currentproperty) may not be accessed during render.
if refs are passed as an argument to a render prop.It's true that the render function could technically misbehave and read the ref during render, but it feels weird to lint for it in the parent component.
Beta Was this translation helpful? Give feedback.
All reactions