Refs cannot be passed to render props #42
                  
                    
                      yepitschunked
                    
                  
                
                  started this conversation in
                Something went wrong
              
            Replies: 2 comments 3 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.
                  
                    3 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Playground link
The compiler/lint rule complains with
InvalidReact: Ref values (thecurrentproperty) 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