From 9c4bdf00f8888e5e84d1a00b134930d5afc2fc8d Mon Sep 17 00:00:00 2001 From: Usman Sabuwala <51731966+max-programming@users.noreply.github.com> Date: Tue, 14 Oct 2025 12:02:36 +0530 Subject: [PATCH 1/3] Fix grammar and clarity in tanstack-start.md Corrected grammatical errors and improved clarity in the documentation. --- docs/integrations/tanstack-start.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/docs/integrations/tanstack-start.md b/docs/integrations/tanstack-start.md index a09da96e..ca1d0616 100644 --- a/docs/integrations/tanstack-start.md +++ b/docs/integrations/tanstack-start.md @@ -16,7 +16,7 @@ head: # Integration with Tanstack Start -Elysia can runs inside Tanstack Start server routes. +Elysia can run inside Tanstack Start server routes. 1. Create **src/routes/api.$.ts** 2. Define an Elysia server @@ -50,7 +50,7 @@ export const Route = createFileRoute('/api/$')({ Elysia should now be running on **/api**. -We may add additional methods to **server.handlers** to support other HTTP methods as need. +We may add additional methods to **server.handlers** to support other HTTP methods as needed. ## Eden @@ -89,12 +89,12 @@ export const api = createIsomorphicFn() // [!code ++] Notice that we use **createIsomorphicFn** to create a separate Eden Treaty instance for both server and client. 1. On server, Elysia is called directly without HTTP overhead. -2. On client, we call Elysia server through HTTP. +2. On client, we call the Elysia server through HTTP. -On React component, we can use `getTreaty` to call Elysia server with type safety. +In a React component, we can use `getTreaty` to call the Elysia server with type safety. ## Loader Data -Tanstack Start support **Loader** to fetch data before rendering the component. +Tanstack Start supports **Loader** to fetch data before rendering the component. ::: code-group @@ -117,7 +117,7 @@ function App() { ::: -Calling Elysia is a loader will be executed on server side during SSR, and doesn't have HTTP overhead. +Calling Elysia in a loader will be executed on the server side during SSR, and doesn't have HTTP overhead. Eden Treaty will ensure type safety on both server and client. @@ -148,7 +148,7 @@ function App() { ::: code-group -This can works with any React Query features like caching, pagination, infinite query, etc. +This can work with any React Query features like caching, pagination, infinite query, etc. --- From d5e5632d96983ec64e9cd72a6559be811483bd95 Mon Sep 17 00:00:00 2001 From: Usman Sabuwala <51731966+max-programming@users.noreply.github.com> Date: Tue, 14 Oct 2025 12:04:22 +0530 Subject: [PATCH 2/3] Clarify Elysia usage in server-side rendering --- docs/integrations/tanstack-start.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/integrations/tanstack-start.md b/docs/integrations/tanstack-start.md index ca1d0616..0460ad9a 100644 --- a/docs/integrations/tanstack-start.md +++ b/docs/integrations/tanstack-start.md @@ -117,7 +117,7 @@ function App() { ::: -Calling Elysia in a loader will be executed on the server side during SSR, and doesn't have HTTP overhead. +Calling Elysia in the loader will make sure to execute it on the server side during SSR, and doesn't have HTTP overhead. Eden Treaty will ensure type safety on both server and client. From eb8588c4801b6b479350f36ce8d0cbb15b32ac84 Mon Sep 17 00:00:00 2001 From: Usman Sabuwala <51731966+max-programming@users.noreply.github.com> Date: Tue, 14 Oct 2025 12:07:37 +0530 Subject: [PATCH 3/3] Refactor text for clarity and consistency --- docs/integrations/tanstack-start.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/integrations/tanstack-start.md b/docs/integrations/tanstack-start.md index 0460ad9a..3216c9b9 100644 --- a/docs/integrations/tanstack-start.md +++ b/docs/integrations/tanstack-start.md @@ -117,7 +117,8 @@ function App() { ::: -Calling Elysia in the loader will make sure to execute it on the server side during SSR, and doesn't have HTTP overhead. +Calling Elysia in a loader executes it on the server during SSR and doesn’t incur HTTP overhead. +When navigating from one page to another, the loader will run on the client-side, making an HTTP request to the endpoint. Eden Treaty will ensure type safety on both server and client. @@ -148,7 +149,7 @@ function App() { ::: code-group -This can work with any React Query features like caching, pagination, infinite query, etc. +This can work with any React Query features like caching, pagination, infinite queries, etc. ---