-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
feat: add experimentalDisableStreaming to react integration (#1) #13036
base: main
Are you sure you want to change the base?
Conversation
* feat: add experimentalDisableStreaming to react integration * chore: commit save point * chore: commit save point
🦋 Changeset detectedLatest commit: f946f07 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Conceptually this makes sense as an option, and needed for most CSS-in-JS usage. |
Co-authored-by: Florian Lefebvre <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. I think this is a useful addition. I've just added a few comments and suggestions.
@@ -0,0 +1,5 @@ | |||
--- | |||
"@astrojs/react": patch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This adds a feature, so would be a minor
"@astrojs/react": patch | ||
--- | ||
|
||
feat: add experimentalDisableStreaming to react integration (#1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feat: add experimentalDisableStreaming to react integration (#1) | |
Add support for disabling streaming in React integration |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
feat: add experimentalDisableStreaming to react integration (#1) | |
Adds experimental support for disabling streaming |
It would be nice to also show a code snippet. This will require a docs PR as well
@@ -14,6 +14,10 @@ export type ReactIntegrationOptions = Pick< | |||
'include' | 'exclude' | 'babel' | |||
> & { | |||
experimentalReactChildren?: boolean; | |||
/** | |||
* Disable streaming support for React components in order to support libraries that are not compatible with streaming like Stitches.js |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Disable streaming support for React components in order to support libraries that are not compatible with streaming like Stitches.js | |
* Disable streaming in React components |
function optionsPlugin( | ||
experimentalReactChildren: boolean, | ||
experimentalDisableStreaming: boolean | ||
): vite.Plugin { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now we're adding more options it's probably best to make this an options object
Changes
This pull request introduces a new feature to the React integration by adding an option to disable streaming support. This feature aims to support libraries that are not compatible with streaming, such as Stitches.js. The most important changes include updates to the configuration options and rendering logic.
Testing
Docs