Welcome to React Router RSC
You won't find me running any JavaScript in the browser!
Element from the server!
, }; } export default function Route({ loaderData, }: Route.ComponentProps) { return ( <>Element from the server!
Message from the server: {loaderData.message}
You won't find me running any JavaScript in the browser!
You won't find me running any JavaScript in the browser!
Hello, {user ? user.name : "anonymous person"}!
Client route
; } ``` We can then re-export these from our lazy loaded route module: ```tsx filename=src/routes/root/route.tsx export { clientAction, clientLoader, shouldRevalidate, } from "./client"; export default function Root() { // ... } ``` This is also the way we would make an entire route a Client Component. ```tsx filename=src/routes/root/route.tsx lines=[1,11] import { default as ClientRoot } from "./route.client"; export { clientAction, clientLoader, shouldRevalidate, } from "./client"; export default function Root() { // Adding a Server Component at the root is required by bundlers // if you're using css side-effects imports. return