diff --git a/site/src/components/docs/FrameworkCase.astro b/site/src/components/docs/FrameworkCase.astro
index c078ed95..5d43425e 100644
--- a/site/src/components/docs/FrameworkCase.astro
+++ b/site/src/components/docs/FrameworkCase.astro
@@ -3,9 +3,15 @@ import type { SupportedFramework } from '@/types/docs';
interface Props {
frameworks?: SupportedFramework[];
+ /**
+ * I'm running into some crazy problems with hydration.
+ * Putting client:load in one of these conditionals causes Astro to just give up hydrating the whole app for some reason.
+ * If you're running into that, too, this prop may be for you.
+ */
+ withHydrationWorkaround?: boolean;
}
-const { frameworks } = Astro.props;
+const { frameworks, withHydrationWorkaround } = Astro.props;
const { framework } = Astro.params;
// Only render if current framework matches, or if no frameworks specified (all frameworks)
@@ -13,19 +19,11 @@ const shouldRender = !frameworks || frameworks.includes(framework as SupportedFr
---
{
- /*
- What I WANT to do is
- ```
- {shouldRender && }
- ```
-
- But I'm running into some crazy problems with hydration.
- Putting client:load in one of these conditionals causes Astro to just give up hydrating the whole app for some reason.
- TODO: fix this
-
- So, while I debug those... let's do this
- */
+ withHydrationWorkaround ? (
+
+
+
+ ) : (
+ shouldRender &&
+ )
}
-
-
-
diff --git a/site/src/components/docs/StyleCase.astro b/site/src/components/docs/StyleCase.astro
index 5c5b8ffc..0afb4c2c 100644
--- a/site/src/components/docs/StyleCase.astro
+++ b/site/src/components/docs/StyleCase.astro
@@ -3,9 +3,15 @@ import type { AnySupportedStyle } from '@/types/docs';
interface Props {
styles?: AnySupportedStyle[];
+ /**
+ * I'm running into some crazy problems with hydration.
+ * Putting client:load in one of these conditionals causes Astro to just give up hydrating the whole app for some reason.
+ * If you're running into that, too, this prop may be for you.
+ */
+ withHydrationWorkaround?: boolean;
}
-const { styles } = Astro.props;
+const { styles, withHydrationWorkaround } = Astro.props;
const { style } = Astro.params;
// Only render if current style matches, or if no styles specified (all styles)
@@ -13,19 +19,11 @@ const shouldRender = !styles || styles.includes(style as AnySupportedStyle);
---
{
- /*
- What I WANT to do is
- ```
- {shouldRender && }
- ```
-
- But I'm running into some crazy problems with hydration.
- Putting client:load in one of these conditionals causes Astro to just give up hydrating the whole app for some reason.
- TODO: fix this
-
- So, while I debug those... let's do this
- */
+ withHydrationWorkaround ? (
+
+
+
+ ) : (
+ shouldRender &&
+ )
}
-
-
-
diff --git a/site/src/content/docs/concepts/architecture.mdx b/site/src/content/docs/concepts/architecture.mdx
index 40360ef1..327bc7bc 100644
--- a/site/src/content/docs/concepts/architecture.mdx
+++ b/site/src/content/docs/concepts/architecture.mdx
@@ -92,7 +92,7 @@ function Player() {
```
-
+
+
-
+
+
-
+
+
-
+
+
-
+
-
+
-
+
diff --git a/site/src/content/docs/reference/play-button.mdx b/site/src/content/docs/reference/play-button.mdx
index 321e3537..9f31601e 100644
--- a/site/src/content/docs/reference/play-button.mdx
+++ b/site/src/content/docs/reference/play-button.mdx
@@ -24,7 +24,7 @@ import { TabsRoot, TabsPanel } from '@/components/Tabs';
## Example
-
+
-
+
+
-
+
+
-
+