From 4d6ddd5b21d6aad5dc4901d10b9bf0a5a1da4a05 Mon Sep 17 00:00:00 2001 From: Ryan Waskiewicz Date: Wed, 29 Jun 2022 14:25:00 -0400 Subject: [PATCH] docs: fix typos (#303) --- docs/concepts/data-fetching.md | 4 ++-- docs/concepts/error-pages.md | 2 +- docs/concepts/islands.md | 4 ++-- docs/concepts/middleware.md | 3 ++- docs/getting-started/create-a-route.md | 4 ++-- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/concepts/data-fetching.md b/docs/concepts/data-fetching.md index 91ae8beb..273d821a 100644 --- a/docs/concepts/data-fetching.md +++ b/docs/concepts/data-fetching.md @@ -3,10 +3,10 @@ description: | Data fetching in Fresh happens inside of route handler functions. These can pass route data to the page via page props. --- -Server side data fetching in Fresh is acomplished through asynchronous +Server side data fetching in Fresh is accomplished through asynchronous [handler functions][route-handlers]. These handler functions can call a `ctx.render()` function with the data to be rendered as an argument. This data -can then be retreived by the page component through the `data` property on the +can then be retrieved by the page component through the `data` property on the `props`. Here is an example: diff --git a/docs/concepts/error-pages.md b/docs/concepts/error-pages.md index 84511da8..1719a2ca 100644 --- a/docs/concepts/error-pages.md +++ b/docs/concepts/error-pages.md @@ -5,7 +5,7 @@ description: | Fresh supports customizing the `404 Not Found`, and the `500 Internal Server Error` pages. These are shown when a request is made but no -matching route exists, and when a middelware, route handler, or page component +matching route exists, and when a middleware, route handler, or page component throws an error respectively. The 404 page can be customized by creating a `_404.tsx` file in the `routes/` diff --git a/docs/concepts/islands.md b/docs/concepts/islands.md index cc6bb5d3..f4372fc9 100644 --- a/docs/concepts/islands.md +++ b/docs/concepts/islands.md @@ -4,8 +4,8 @@ description: | --- Islands enable client side interactivity in Fresh. Islands are isolated Preact -components that are are rendered on the client. This is different from all other -components in Fresh, as they are ususally just rendered on the server. +components that are rendered on the client. This is different from all other +components in Fresh, as they are usually just rendered on the server. Islands are defined by creating a file in the `islands/` folder in a Fresh project. The name of this file must be a PascalCase name of the island. The file diff --git a/docs/concepts/middleware.md b/docs/concepts/middleware.md index 0aa3f23f..ee4ab97c 100644 --- a/docs/concepts/middleware.md +++ b/docs/concepts/middleware.md @@ -61,7 +61,8 @@ For a request to `/` the request will flow like this: For a request to `/admin` the request flows like this: 1. The `routes/_middleware.ts` middleware is invoked. -2. Calling `ctx.next()` will invoke the `routes/admin/_middleware.ts` middlware. +2. Calling `ctx.next()` will invoke the `routes/admin/_middleware.ts` + middleware. 3. Calling `ctx.next()` will invoke the `routes/admin/index.ts` handler. For a request to `/admin/signin` the request flows like this: diff --git a/docs/getting-started/create-a-route.md b/docs/getting-started/create-a-route.md index d6d9f265..46ac7619 100644 --- a/docs/getting-started/create-a-route.md +++ b/docs/getting-started/create-a-route.md @@ -52,12 +52,12 @@ export default function AboutPage() { > ℹ️ The first two lines are the JSX pragma, and the import for the JSX create > element function. These are just boilerplate. You don't need to know exactly -> what they do - they just ensure that JSX get's rendered correctly. +> what they do - they just ensure that JSX gets rendered correctly. The new page will be visible at `http://localhost:8000/about`. [concepts-routing]: /docs/concepts/routing