We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stack
Stack appears to accept a ref prop based on the TypeScript types, but this ref is not actually bound to the underlying element:
ref
export function Example() { const ref = useRef<HTMLDivElement>(null) useEffect(() => console.log(ref.current)) return <Stack {...props} ref={ref}>contents</Stack> }
If Stack correctly forwarded its ref, the console would log an HTMLDivElement instance. However, it instead always logs null.
HTMLDivElement
null
The text was updated successfully, but these errors were encountered:
import React, { forwardRef } from "react";
const Stack = forwardRef((props, ref) => { return ( <div {...props} ref={ref}> {props.children} ); });
export default Stack;
Sorry, something went wrong.
No branches or pull requests
Stack
appears to accept aref
prop based on the TypeScript types, but this ref is not actually bound to the underlying element:If
Stack
correctly forwarded its ref, the console would log anHTMLDivElement
instance. However, it instead always logsnull
.The text was updated successfully, but these errors were encountered: