-
Notifications
You must be signed in to change notification settings - Fork 216
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
Radix themes with Astro #528
Comments
For future reference, it's how astro works. You cannot use react context within multiple astro islands.
|
@thebrownfox are you saying features that rely on Theme context won't work in Astro? Not sure I'm seeing a workaround there |
Yes. I can see there could be some workarounds.
|
I see two things that need to happen for Themes to work with Astro:
In my opinion these are very reasonable things that should already be in Radix Themes. Contexts should've never been used across components; only a composition of a component makes sense to be using a context ( And mounting to closest theme Some people like to mount |
Not really an issue on our part since Radix Themes relies on context by design, and that only works in a single React root. We have no plans to change our design at the moment, but I'll move this into discussion to keep the conversation open in the future. |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
With some components I get
useThemeContext must be used within a Theme
.Here's reproducible example: https://stackblitz.com/edit/github-uiu4in?file=src%2Fpages%2Findex.astro
The text was updated successfully, but these errors were encountered: