Skip to content

Commit 8b0e0f5

Browse files
danieljcafonsoatilafassina
authored andcommitted
feat: sync start docs
1 parent 4807164 commit 8b0e0f5

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

src/routes/solid-start/advanced/session.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ const getUsers = cache(async (id: string) => {
5252
const user = await getUser();
5353
if (!user) throw redirect("/login");
5454
return store.getUsers(id, "*");
55-
});
55+
}, "users");
5656

5757
// page component
58-
export default function Students() {
58+
export default function Users() {
5959
const users = createAsync(() => getUsers());
6060
}
6161
```

src/routes/solid-start/building-your-application/data-loading.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ With this method, however, there are some caveats to be aware of:
6565
If the data needs a refresh, the [`refetch`](/guides/fetching-data#refetch) function returned in the `createResource` can be used.
6666
2. Before the route is rendered, the `load` function is called.
6767
It does not share the same `context` as the route.
68-
The context tree that is exposed to the `load` function is anything above the `Routes` component.
68+
The context tree that is exposed to the `load` function is anything above the `Page` component.
6969
3. On both the server and the client, the `load` function is called.
7070
The resources can avoid refetching if they serialized their data in the server render.
7171
The server-side render will only wait for the resources to fetch and serialize if the resource signals are accessed under a `Suspense` boundary.

src/routes/solid-start/building-your-application/routing.mdx

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This includes your pages and API routes.
1616

1717
SolidStart traverses your `routes` directory, collects all of the routes, and then makes them accessible using the [`<FileRoutes />`](/solid-start/reference/routing/file-routes).
1818
This component will only include your UI routes, and not your API routes.
19-
Rather than manually defining each `Route` inside a `Routes` component, `<FileRoutes />` will generate the routes for you based on the file system.
19+
Rather than manually defining each `Route` inside a `Router` component, `<FileRoutes />` will generate the routes for you based on the file system.
2020

2121
Because `<FileRoutes />` returns a routing config object, you can use it with the router of your choice.
2222
In this example we use [`solid-router`](/solid-router):
@@ -93,27 +93,29 @@ To avoid this, you can rename the `index.tsx` file to the name of the folder it
9393

9494
#### Escaping nested routes
9595

96-
When you have a path that is nested but wish for it to have a separate Layout, you can escape the nested route by using the `.` character.
96+
When you have a path that is nested but wish for it to have a separate Layout, you can escape the nested route by applying a name between `( )`.
9797
This will allow you to create a new route that is not nested under the previous route:
9898

99-
```jsx {6}
99+
```jsx {5-6}
100100
|-- routes/
101101
|-- users/
102102
|-- index.tsx
103103
|-- projects.tsx
104-
|-- users.[id].tsx
104+
|-- users(details)/
105+
|-- [id].tsx
105106
```
106107

107108
Additionally, you can incorporate nested layouts of their own:
108109

109-
```tsx {5-7}
110+
```tsx {2, 78}
110111
|-- routes/
111-
|-- users.tsx/
112+
|-- users.tsx
113+
|-- users(details).tsx
114+
|-- users/
112115
|-- index.tsx
113116
|-- projects.tsx
114-
|-- users.[id]/
115-
|-- index.tsx
116-
|-- settings.tsx
117+
|-- users(details)/
118+
|-- [id].tsx
117119
```
118120

119121
### Dynamic routes

0 commit comments

Comments
 (0)