Skip to content
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

Error while using with Astro.js #887

Open
hemandev opened this issue Apr 30, 2023 · 3 comments
Open

Error while using with Astro.js #887

hemandev opened this issue Apr 30, 2023 · 3 comments

Comments

@hemandev
Copy link

I am getting an error while using rc-slider with Astro.js

Error: Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: object.

The issue is only happening if I use the client:load directive from astro, which initially renders the component on server and then hydrates it on the client. Its working fine if client:only is used

Link to CodeSandbox

@hemandev
Copy link
Author

I'm guessing that the root cause might be because of forwardRef.
I just forked the repo and exposed another named export without forwardRef and it's working.
I can raise a PR if you're open to the fix

@yoyo837
Copy link
Member

yoyo837 commented May 23, 2023

PR welcome.

@pythonpioneer
Copy link

@hemandev Yes, the error was caused by forwardRef.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants