Skip to content
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: support suspence event #6975

Merged
merged 2 commits into from
Aug 30, 2024
Merged

feat: support suspence event #6975

merged 2 commits into from
Aug 30, 2024

Conversation

answershuto
Copy link
Collaborator

close #6973

wssgcg1213
wssgcg1213 previously approved these changes Aug 27, 2024
@@ -166,6 +167,6 @@ function Data(props) {
const data = useSuspenseData();

return (
<script dangerouslySetInnerHTML={{ __html: `!function(){window['${LOADER}'] = window['${LOADER}'] || {};window['${LOADER}']['${props.id}'] = ${JSON.stringify(data)}}();` }} />
<script id={props.id ? `suspenseScript:${props.id}` : ''} dangerouslySetInnerHTML={{ __html: `!function(){window['${LOADER}'] = window['${LOADER}'] || {};window['${LOADER}']['${props.id}'] = ${JSON.stringify(data)}}();` }} />
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

id 可以带:

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

你说有没有一种可能,流式框架里全是这样的🤔

@answershuto answershuto merged commit 9c3d9c5 into release/next Aug 30, 2024
7 checks passed
@answershuto answershuto deleted the feat/suspense_event branch August 30, 2024 02:23
@ClarkXia ClarkXia mentioned this pull request Sep 4, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants