Skip to content
Source
Sign inSign up
TanStack/router

test(rsc): add dev-mode HMR e2e for RSC routes with a co-located server fn #7901

Closedsreetamdas(GitHub profile, opens in a new tab)wants to merge 6 commits intomain fromrefs/pull/7901/headopened

Showing 19 changed files with 107 additions and 0 deletions (loading 14).

x
0 of 19 viewed, 19 left
10 additions and 0 deletionse2e/react-start/rsc-hmr/src/routes/-separateFile.tsxAdded
View file
@@ -0,0 +1,10 @@
+import { createServerFn } from '@tanstack/react-start'
+import { renderServerComponent } from '@tanstack/react-start/rsc'
+​
+export const getSeparateFileContent = createServerFn({
+ method: 'GET',
+}).handler(async () => {
+ return renderServerComponent(
+ <p data-testid="separate-file-server-content">server-rendered content</p>,
+ )
+})
52 additions and 0 deletionse2e/react-start/rsc-hmr/src/routes/__root.tsxAdded
View file
@@ -0,0 +1,52 @@
+/// <reference types="vite/client" />
+import {
+ ClientOnly,
+ HeadContent,
+ Link,
+ Outlet,
+ Scripts,
+ createRootRoute,
+} from '@tanstack/react-router'
+​
+export const Route = createRootRoute({
+ head: () => ({