From 6c90451d9e8929e76fc488c5ee4847201bbc8ca1 Mon Sep 17 00:00:00 2001 From: Arturo Silva Date: Wed, 22 Jan 2025 22:15:54 -0500 Subject: [PATCH 1/4] docs: add code snippet and blurb about experimentalDisableStreaming option --- .../en/guides/integrations-guide/react.mdx | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/content/docs/en/guides/integrations-guide/react.mdx b/src/content/docs/en/guides/integrations-guide/react.mdx index 39a2a12d09a5a..187700cc63c3d 100644 --- a/src/content/docs/en/guides/integrations-guide/react.mdx +++ b/src/content/docs/en/guides/integrations-guide/react.mdx @@ -186,6 +186,24 @@ export default defineConfig({ }); ``` +### Disable streaming + +By default, Astro streams the output of your React components. This can be disabled by setting the `experimentalDisableStreaming` option to `true`: + +```js title="astro.config.mjs" ins={8} +import { defineConfig } from 'astro/config'; +import react from '@astrojs/react'; + +export default defineConfig({ + // ... + integrations: [ + react({ + experimentalDisableStreaming: true, + }), + ], +}); +``` + [astro-integration]: /en/guides/integrations-guide/ [astro-ui-frameworks]: /en/guides/framework-components/#using-framework-components From 67405bb3b182f65a6dc6591aa1a933c3861a8eb6 Mon Sep 17 00:00:00 2001 From: Arturo Silva Date: Thu, 23 Jan 2025 12:31:15 -0500 Subject: [PATCH 2/4] Update src/content/docs/en/guides/integrations-guide/react.mdx --- src/content/docs/en/guides/integrations-guide/react.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/en/guides/integrations-guide/react.mdx b/src/content/docs/en/guides/integrations-guide/react.mdx index 187700cc63c3d..3c89a54b3061c 100644 --- a/src/content/docs/en/guides/integrations-guide/react.mdx +++ b/src/content/docs/en/guides/integrations-guide/react.mdx @@ -188,7 +188,7 @@ export default defineConfig({ ### Disable streaming -By default, Astro streams the output of your React components. This can be disabled by setting the `experimentalDisableStreaming` option to `true`: +Astro streams the output of React components by default. However, you can disable this behavior by enabling the experimentalDisableStreaming option. This is particularly helpful for supporting libraries that don’t work well with streaming, like certain CSS-in-JS solutions. To disable streaming for all React components in your project, configure @astrojs/react with `experimentalDisableStreaming: true` ```js title="astro.config.mjs" ins={8} import { defineConfig } from 'astro/config'; From 1ff6f97659c2258667fd0bdfda6aec551a130228 Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com> Date: Fri, 24 Jan 2025 08:29:00 -0400 Subject: [PATCH 3/4] sarah light text editing --- src/content/docs/en/guides/integrations-guide/react.mdx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/content/docs/en/guides/integrations-guide/react.mdx b/src/content/docs/en/guides/integrations-guide/react.mdx index 3c89a54b3061c..c03c082e515ad 100644 --- a/src/content/docs/en/guides/integrations-guide/react.mdx +++ b/src/content/docs/en/guides/integrations-guide/react.mdx @@ -186,9 +186,11 @@ export default defineConfig({ }); ``` -### Disable streaming +### Disable streaming (experimental) -Astro streams the output of React components by default. However, you can disable this behavior by enabling the experimentalDisableStreaming option. This is particularly helpful for supporting libraries that don’t work well with streaming, like certain CSS-in-JS solutions. To disable streaming for all React components in your project, configure @astrojs/react with `experimentalDisableStreaming: true` +Astro streams the output of React components by default. However, you can disable this behavior by enabling the `experimentalDisableStreaming` option. This is particularly helpful for supporting libraries that don’t work well with streaming, like some CSS-in-JS solutions. + +To disable streaming for all React components in your project, configure `@astrojs/react` with `experimentalDisableStreaming: true` ```js title="astro.config.mjs" ins={8} import { defineConfig } from 'astro/config'; From aafc0b645899a8b356afedea7e4b1c66693ca2ab Mon Sep 17 00:00:00 2001 From: Sarah Rainsberger <5098874+sarah11918@users.noreply.github.com> Date: Mon, 27 Jan 2025 15:45:16 -0400 Subject: [PATCH 4/4] punctuation --- src/content/docs/en/guides/integrations-guide/react.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/en/guides/integrations-guide/react.mdx b/src/content/docs/en/guides/integrations-guide/react.mdx index c03c082e515ad..f4b40cde2bcc0 100644 --- a/src/content/docs/en/guides/integrations-guide/react.mdx +++ b/src/content/docs/en/guides/integrations-guide/react.mdx @@ -190,7 +190,7 @@ export default defineConfig({ Astro streams the output of React components by default. However, you can disable this behavior by enabling the `experimentalDisableStreaming` option. This is particularly helpful for supporting libraries that don’t work well with streaming, like some CSS-in-JS solutions. -To disable streaming for all React components in your project, configure `@astrojs/react` with `experimentalDisableStreaming: true` +To disable streaming for all React components in your project, configure `@astrojs/react` with `experimentalDisableStreaming: true`: ```js title="astro.config.mjs" ins={8} import { defineConfig } from 'astro/config';