-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
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
Typescript: type issue with components ref #653
Comments
Does Sidetab component excepts ref or not ??? interface SidetabProps extends React.HTMLAttributes { ref?: React.Ref; |
The same is happening in the PopupButton and ref is in the documentation: The error I get is: |
Hello @TommyBacco @FranRom how do you define your const ref = useRef(); There are no TS errors on props or ref:
Edit: Actually we do have a import { GenericEmbed } from "@typeform/embed-react/build/components";
const ref = useRef<GenericEmbed>();
const openPopup = () => ref.current?.open(); |
Actually you are right. I was building my test project via vite. When I build with It proved to be quite challenging to type properly when we reuse React's |
🎉 This issue has been resolved in version @typeform/embed-v5.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This issue has been resolved in version @typeform/embed-react-v4.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
It looks like there is some misalignment in the types when passing a
ref
making necessary to suppress the type error in order to proceed and use the components programmatically.The text was updated successfully, but these errors were encountered: