-
Notifications
You must be signed in to change notification settings - Fork 2.1k
add SuspenseWrappers to Runtime #7131
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
Conversation
|
这两个 case 具体的场景是什么,特别是强制修改 APP_CONFIG 的逻辑,正常情况下 应该都是在入口做处理 |
4d1b951 to
b35bcbe
Compare
已修改,仅保留 addSuspenseWrapper API。一般用于暴露给 ice runtime 插件消费,更细粒度的感知和控制 Suspense 模块,便于开发插件,通用的处理异常边界/采集 Suspense 性能数据等。 |
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.
Pull Request Overview
This PR adds dynamic Suspense wrapper support to the runtime, allowing applications to register Suspense wrappers that can be composed around Suspense-enabled components.
- Add
SuspenseWrappersconfiguration to the Runtime and AppContext types - Enhance
withSuspenseHOC to compose multiple Suspense wrappers around components - Provide new
addSuspenseWrapperAPI for registering wrappers
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| packages/runtime/src/types.ts | Add SuspenseWrapper types and configuration interfaces |
| packages/runtime/src/runtime.tsx | Implement SuspenseWrapper storage and registration API |
| packages/runtime/src/Suspense.tsx | Enhance withSuspense to compose registered wrappers |
| .changeset/ten-paws-sort.md | Add changeset for patch release |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
* feat: add SuspenseWrappers to Runtime (#7131) * feat: add SuspenseWrappers to Runtime * chore(runtime): format code * fix(runtime): Apply suggestions from code review Co-authored-by: Copilot <[email protected]> * fix(runtime): remove redundant composeSuspenseWrappers function --------- Co-authored-by: Copilot <[email protected]> * chore: update versions (#7133) * chore: update versions * Remove 3.6.6 entry from CHANGELOG Removed version 3.6.6 entry from CHANGELOG. * Update package.json * Update CHANGELOG.md * Downgrade version from 1.1.7 to 1.1.6 * Remove changelog entry for version 1.2.7 Removed version 1.2.7 entry from changelog. * Update package.json * Update CHANGELOG.md * Update package.json * Update package.json * Update package.json * Update pnpm-lock.yaml --------- Co-authored-by: Mixiu <[email protected]> Co-authored-by: Copilot <[email protected]>
add SuspenseWrappers to Runtime
SuspenseWrapperstoRuntimefor dynamic Suspense wrapperswithSuspenseto compose multiple wrappers