-
-
Notifications
You must be signed in to change notification settings - Fork 448
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
Errors when using react-tabs in an Astro page #558
Comments
Hi there @1R053. This issue can be closed. I figured this out how to get this working with your help (I needed a reminder to add client:load). Using react components in Astro is a little more complicated due to Astro's hydration (this does allow you to ship React lazily, only if needed). I want to ship React on first load anyway for something else however, so also use TwoBasicTabs.jsx
index.astro
In the .astro file, static Content collections, e.g. from .mdx files can be passed in as props, instead of defining content in .jsx files in an Astro project. Make sure your
Commands to reproduce:
This was on Windows, with these versions:
|
I am unable to get this component running in the astro framework.
To reproduce you can create a new astro app with react support, e.g.
now just create a page like this and enable client scripting
The tab buttons are loaded, but not the content. Also clicking on tabs has no effect. There are also various browser console errors and warnings.
Any idea, what I might have misconfigured? Or is a change to the library needed to make it work?
Thanks
The text was updated successfully, but these errors were encountered: