1616
1717# Integration with Tanstack Start
1818
19- Elysia can runs inside Tanstack Start server routes.
19+ Elysia can run inside Tanstack Start server routes.
2020
21211 . Create ** src/routes/api.$.ts**
22222 . Define an Elysia server
@@ -50,7 +50,7 @@ export const Route = createFileRoute('/api/$')({
5050
5151Elysia should now be running on ** /api** .
5252
53- We may add additional methods to ** server.handlers** to support other HTTP methods as need .
53+ We may add additional methods to ** server.handlers** to support other HTTP methods as needed .
5454
5555## Eden
5656
@@ -89,12 +89,12 @@ export const api = createIsomorphicFn() // [!code ++]
8989
9090Notice that we use ** createIsomorphicFn** to create a separate Eden Treaty instance for both server and client.
91911 . On server, Elysia is called directly without HTTP overhead.
92- 2 . On client, we call Elysia server through HTTP.
92+ 2 . On client, we call the Elysia server through HTTP.
9393
94- On React component, we can use ` getTreaty ` to call Elysia server with type safety.
94+ In a React component, we can use ` getTreaty ` to call the Elysia server with type safety.
9595
9696## Loader Data
97- Tanstack Start support ** Loader** to fetch data before rendering the component.
97+ Tanstack Start supports ** Loader** to fetch data before rendering the component.
9898
9999::: code-group
100100
@@ -117,7 +117,7 @@ function App() {
117117
118118:::
119119
120- Calling Elysia is a loader will be executed on server side during SSR, and doesn't have HTTP overhead.
120+ Calling Elysia in a loader will be executed on the server side during SSR, and doesn't have HTTP overhead.
121121
122122Eden Treaty will ensure type safety on both server and client.
123123
@@ -148,7 +148,7 @@ function App() {
148148
149149::: code-group
150150
151- This can works with any React Query features like caching, pagination, infinite query, etc.
151+ This can work with any React Query features like caching, pagination, infinite query, etc.
152152
153153---
154154
0 commit comments