-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix potential race condition of renderer (#1072)
- Loading branch information
Showing
6 changed files
with
378 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'ai': patch | ||
--- | ||
|
||
fix potential race conditions |
181 changes: 181 additions & 0 deletions
181
packages/core/rsc/__snapshots__/streamable.ui.test.tsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,181 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`rsc - render() > should emit React Nodes with async render function 1`] = ` | ||
{ | ||
"children": { | ||
"children": {}, | ||
"props": { | ||
"current": undefined, | ||
"next": { | ||
"done": false, | ||
"next": { | ||
"done": true, | ||
"value": <div> | ||
Weather | ||
</div>, | ||
}, | ||
"value": <div> | ||
Weather | ||
</div>, | ||
}, | ||
}, | ||
"type": "Row", | ||
}, | ||
"props": { | ||
"fallback": undefined, | ||
}, | ||
"type": "Symbol(react.suspense)", | ||
} | ||
`; | ||
|
||
exports[`rsc - render() > should emit React Nodes with generator render function 1`] = ` | ||
{ | ||
"children": { | ||
"children": {}, | ||
"props": { | ||
"current": undefined, | ||
"next": { | ||
"done": false, | ||
"next": { | ||
"done": false, | ||
"next": { | ||
"done": true, | ||
"value": <div> | ||
Weather | ||
</div>, | ||
}, | ||
"value": <div> | ||
Weather | ||
</div>, | ||
}, | ||
"value": <div> | ||
Loading... | ||
</div>, | ||
}, | ||
}, | ||
"type": "Row", | ||
}, | ||
"props": { | ||
"fallback": undefined, | ||
}, | ||
"type": "Symbol(react.suspense)", | ||
} | ||
`; | ||
|
||
exports[`rsc - render() > should emit React Nodes with sync render function 1`] = ` | ||
{ | ||
"children": { | ||
"children": {}, | ||
"props": { | ||
"current": undefined, | ||
"next": { | ||
"done": false, | ||
"next": { | ||
"done": true, | ||
"value": <div> | ||
Weather | ||
</div>, | ||
}, | ||
"value": <div> | ||
Weather | ||
</div>, | ||
}, | ||
}, | ||
"type": "Row", | ||
}, | ||
"props": { | ||
"fallback": undefined, | ||
}, | ||
"type": "Symbol(react.suspense)", | ||
} | ||
`; | ||
|
||
exports[`rsc - streamable > should emit React Nodes with async render function 1`] = ` | ||
{ | ||
"children": { | ||
"children": {}, | ||
"props": { | ||
"current": undefined, | ||
"next": { | ||
"done": false, | ||
"next": { | ||
"done": true, | ||
"value": <div> | ||
Weather | ||
</div>, | ||
}, | ||
"value": <div> | ||
Weather | ||
</div>, | ||
}, | ||
}, | ||
"type": "Row", | ||
}, | ||
"props": { | ||
"fallback": undefined, | ||
}, | ||
"type": "Symbol(react.suspense)", | ||
} | ||
`; | ||
|
||
exports[`rsc - streamable > should emit React Nodes with generator render function 1`] = ` | ||
{ | ||
"children": { | ||
"children": {}, | ||
"props": { | ||
"current": undefined, | ||
"next": { | ||
"done": false, | ||
"next": { | ||
"done": false, | ||
"next": { | ||
"done": true, | ||
"value": <div> | ||
Weather | ||
</div>, | ||
}, | ||
"value": <div> | ||
Weather | ||
</div>, | ||
}, | ||
"value": <div> | ||
Loading... | ||
</div>, | ||
}, | ||
}, | ||
"type": "Row", | ||
}, | ||
"props": { | ||
"fallback": undefined, | ||
}, | ||
"type": "Symbol(react.suspense)", | ||
} | ||
`; | ||
|
||
exports[`rsc - streamable > should emit React Nodes with sync render function 1`] = ` | ||
{ | ||
"children": { | ||
"children": {}, | ||
"props": { | ||
"current": undefined, | ||
"next": { | ||
"done": false, | ||
"next": { | ||
"done": true, | ||
"value": <div> | ||
Weather | ||
</div>, | ||
}, | ||
"value": <div> | ||
Weather | ||
</div>, | ||
}, | ||
}, | ||
"type": "Row", | ||
}, | ||
"props": { | ||
"fallback": undefined, | ||
}, | ||
"type": "Symbol(react.suspense)", | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.