-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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: rsc server route #6528
feat: rsc server route #6528
Conversation
examples/with-rsc/package.json
Outdated
@@ -12,7 +12,8 @@ | |||
"@ice/app": "workspace:*", | |||
"@ice/runtime": "workspace:*", | |||
"react": "^18.2.0", | |||
"react-dom": "^18.2.0" | |||
"react-dom": "^18.2.0", | |||
"react-router-dom": "6.14.2" |
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.
这个依赖应该不需要
location, | ||
renderOptions, | ||
}: RenderServerEntry, | ||
): Promise<Response> { | ||
const { Document } = renderOptions; | ||
const appContext = runtime.getAppContext(); | ||
const { routes, routePath, loaderData, basename } = appContext; | ||
const { routes, matches, routeModules, requestContext, ...staticContext } = appContext; |
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.
warning 需要处理
@@ -289,6 +288,11 @@ async function doRender(serverContext: ServerContext, renderOptions: RenderOptio | |||
} | |||
} | |||
|
|||
// Render Document for RSC App. |
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.
RSC 相关逻辑可以统一考虑在 runRSCApp 下处理,公共的 server 逻辑后面可以单独抽象
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## feat-rsc #6528 +/- ##
============================================
- Coverage 80.01% 79.95% -0.07%
============================================
Files 254 255 +1
Lines 22200 22157 -43
Branches 2729 2727 -2
============================================
- Hits 17764 17715 -49
- Misses 4392 4398 +6
Partials 44 44
☔ View full report in Codecov by Sentry. |
feat: