Skip to content

Commit 07b18dc

Browse files
chore: fix docs links (#113)
1 parent b538a27 commit 07b18dc

File tree

32 files changed

+64
-66
lines changed

32 files changed

+64
-66
lines changed

_official-blog-tutorial/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ npx create-remix --template remix-run/indie-stack
1414
- Production-ready [SQLite Database](https://sqlite.org)
1515
- Healthcheck endpoint for [Fly backups region fallbacks](https://fly.io/docs/reference/configuration/#services-http_checks)
1616
- [GitHub Actions](https://github.com/features/actions) for deploy on merge to production and staging environments
17-
- Email/Password Authentication with [cookie-based sessions](https://remix.run/docs/en/v1/api/remix#createcookiesessionstorage)
17+
- Email/Password Authentication with [cookie-based sessions](https://remix.run/utils/sessions#createcookiesessionstorage)
1818
- Database ORM with [Prisma](https://prisma.io)
1919
- Styling with [Tailwind](https://tailwindcss.com/)
2020
- End-to-end testing with [Cypress](https://cypress.io)

basic/app/root.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import darkStylesUrl from "~/styles/dark.css";
2222
* every route in the app, but individual routes can include their own links
2323
* that are automatically unloaded when a user navigates away from the route.
2424
*
25-
* https://remix.run/api/app#links
25+
* https://remix.run/route/links
2626
*/
2727
export const links: LinksFunction = () => {
2828
return [

basic/app/routes/demos/actions.tsx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const meta: MetaFunction = () => ({
88
});
99

1010
// When your form sends a POST, the action is called on the server.
11-
// - https://remix.run/api/conventions#action
11+
// - https://remix.run/route/action
1212
// - https://remix.run/guides/data-updates
1313
export const action = async ({ request }: ActionArgs) => {
1414
const formData = await request.formData();
@@ -34,7 +34,7 @@ export const action = async ({ request }: ActionArgs) => {
3434
};
3535

3636
export default function ActionsDemo() {
37-
// https://remix.run/api/remix#useactiondata
37+
// https://remix.run/hooks/use-action-data
3838
const actionMessage = useActionData<typeof action>();
3939
const answerRef = useRef<HTMLInputElement>(null);
4040

@@ -85,13 +85,11 @@ export default function ActionsDemo() {
8585
</li>
8686
<li>
8787
API:{" "}
88-
<a href="https://remix.run/api/conventions#action">
89-
Route Action Export
90-
</a>
88+
<a href="https://remix.run/route/action">Route Action Export</a>
9189
</li>
9290
<li>
9391
API:{" "}
94-
<a href="https://remix.run/api/remix#useactiondata">
92+
<a href="https://remix.run/hooks/use-action-data">
9593
<code>useActionData</code>
9694
</a>
9795
</li>

basic/app/routes/demos/params/$id.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { useCatch, useLoaderData } from "@remix-run/react";
44

55
// The `$` in route filenames becomes a pattern that's parsed from the URL and
66
// passed to your loaders so you can look up data.
7-
// - https://remix.run/api/conventions#loader-params
7+
// - https://remix.run/route/loader#params
88
export const loader = async ({ params }: LoaderArgs) => {
99
// pretend like we're using params.id to look something up in the db
1010

@@ -47,9 +47,9 @@ export default function ParamDemo() {
4747
);
4848
}
4949

50-
// https://remix.run/api/conventions#catchboundary
51-
// https://remix.run/api/remix#usecatch
52-
// https://remix.run/api/guides/not-found
50+
// https://remix.run/route/catch-boundary
51+
// https://remix.run/hooks/use-catch
52+
// https://remix.run/guides/not-found
5353
export function CatchBoundary() {
5454
const caught = useCatch();
5555

@@ -91,8 +91,8 @@ export function CatchBoundary() {
9191
);
9292
}
9393

94-
// https://remix.run/api/conventions#errorboundary
95-
// https://remix.run/api/guides/not-found
94+
// https://remix.run/route/error-boundary
95+
// https://remix.run/guides/not-found
9696
export function ErrorBoundary({ error }: { error: Error }) {
9797
console.error(error);
9898
return (

basic/app/routes/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ type IndexData = {
1010
// Loaders provide data to components and are only ever called on the server, so
1111
// you can connect to a database or run any server side code you want right next
1212
// to the component that renders it.
13-
// https://remix.run/api/conventions#loader
13+
// https://remix.run/route/loader
1414
export const loader = async () => {
1515
const data: IndexData = {
1616
resources: [
@@ -43,11 +43,11 @@ export const loader = async () => {
4343
],
4444
};
4545

46-
// https://remix.run/api/remix#json
46+
// https://remix.run/utils/json
4747
return json(data);
4848
};
4949

50-
// https://remix.run/api/conventions#meta
50+
// https://remix.run/route/meta
5151
export const meta: MetaFunction = () => ({
5252
title: "Remix Starter",
5353
description: "Welcome to remix!",

catch-boundary/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ Check [app/routes/users/$userId.tsx](app/routes/users/$userId.tsx) to see the Ca
1616

1717
## Related Links
1818

19-
- [CatchBoundary in the Remix Docs](https://remix.run/api/conventions#catchboundary)
19+
- [CatchBoundary in the Remix Docs](https://remix.run/route/catch-boundary)

combobox-resource-route/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ The relevant files are:
2020

2121
## Related Links
2222

23-
- [useFetcher](https://remix.run/api/remix#usefetcher)
23+
- [useFetcher](https://remix.run/hooks/use-fetcher)
2424
- [Resource Routes](https://remix.run/guides/resource-routes)
2525
- [Reach UI Combobox](https://reach.tech/combobox)

combobox-resource-route/app/routes/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import type { Lang } from "~/models/langs";
1212

1313
export function links() {
1414
// Add them to the page when this route is active:
15-
// https://remix.run/api/conventions#links
15+
// https://remix.run/route/links
1616
return [{ rel: "stylesheet", href: comboboxStyles }];
1717
}
1818

dark-mode/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ The Themed component is used to conditionally render two components depending on
2222

2323
## Related Links
2424

25-
- [Creating cookie sessions in the Remix docs](https://remix.run/docs/en/v1/api/remix#createcookiesessionstorage)
26-
- [useFetcher in the Remix docs](https://remix.run/docs/en/v1/api/remix#usefetcher) (used to tell the server to update the cookie value when the theme changes)
27-
- [Blog post with complete explanation of each part of the code](https://www.mattstobbs.com/remix-dark-mode/)
25+
- [Creating cookie sessions in the Remix docs](https://remix.run/utils/sessions#createcookiesessionstorage)
26+
- [useFetcher in the Remix docs](https://remix.run/hooks/use-fetcher) (used to tell the server to update the cookie value when the theme changes)
27+
- [Blog post with complete explanation of each part of the code](https://www.mattstobbs.com/remix-dark-mode)

dataloader/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
This example shows how to avoid redundant roundtrips to data sources via batching and caching, implemented with [DataLoader](https://github.com/graphql/dataloader). This comes in handy when there are multiple nested routes that depend on the same data source.
44

5-
Note that in many cases, you can meet the same requirement with Remix's own [useMatches](https://remix.run/docs/en/v1/api/remix#usematches) which lets you use all of your parent-routes' data in child routes. If that suits your use case, using `useMatches` is preferable. There are cases where this might not be the best fit though, including:
5+
Note that in many cases, you can meet the same requirement with Remix's own [useMatches](https://remix.run/hooks/use-matches) which lets you use all of your parent-routes' data in child routes. If that suits your use case, using `useMatches` is preferable. There are cases where this might not be the best fit though, including:
66

77
- You can't be sure if a parent did already request a particular piece of data
88
- You don't want your data loading to be tightly coupled with your parent routes, for architectural reasons
@@ -17,10 +17,10 @@ Open this example on [CodeSandbox](https://codesandbox.com):
1717

1818
`app/data.server.ts` implements the `db` object which mimics an ORM in the style of [Prisma](https://www.prisma.io/). The method `db.user#findMany` logs _user#findMany_ to the console, for demo purposes.
1919

20-
There's exactly one DataLoader factory `createUsersByIdLoader`, implemented in `app/loaders/userLoader.ts`. It's put on context of [createRequestHandler](https://remix.run/docs/en/v1/other-api/adapter#createrequesthandler) in `server/index.ts` as `usersById` which is made available to all Remix-loaders and -actions. Both the loaders of `app/routes/users.tsx` and `app/routes/users/index.tsx` make calls to this loader. When inspecting the server logs while refreshing the page, you'll notice that there's only one log _user#findMany_ per request, proving that with this implementation, there's only one rountrip to the database.
20+
There's exactly one DataLoader factory `createUsersByIdLoader`, implemented in `app/loaders/userLoader.ts`. It's put on context of [createRequestHandler](https://remix.run/other-api/adapter#createrequesthandler) in `server/index.ts` as `usersById` which is made available to all Remix-loaders and -actions. Both the loaders of `app/routes/users.tsx` and `app/routes/users/index.tsx` make calls to this loader. When inspecting the server logs while refreshing the page, you'll notice that there's only one log _user#findMany_ per request, proving that with this implementation, there's only one rountrip to the database.
2121

2222
## Related Links
2323

2424
- [DataLoader docs](https://github.com/graphql/dataloader)
2525
- [DataLoader – Source code walkthrough [video]](https://youtu.be/OQTnXNCDywA), for those interested
26-
- Remix docs: [useMatches](https://remix.run/docs/en/v1/api/remix#usematches)
26+
- Remix docs: [useMatches](https://remix.run/hooks/use-matches)

0 commit comments

Comments
 (0)