docs: remove handler functions link (#400)
This commit is contained in:
@@ -3,11 +3,10 @@ description: |
|
|||||||
Data fetching in Fresh happens inside of route handler functions. These can pass route data to the page via page props.
|
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 accomplished through asynchronous
|
Server side data fetching in Fresh is accomplished through asynchronous handler
|
||||||
[handler functions][route-handlers]. These handler functions can call a
|
functions. These handler functions can call a `ctx.render()` function with the
|
||||||
`ctx.render()` function with the data to be rendered as an argument. This data
|
data to be rendered as an argument. This data can then be retrieved by the page
|
||||||
can then be retrieved by the page component through the `data` property on the
|
component through the `data` property on the `props`.
|
||||||
`props`.
|
|
||||||
|
|
||||||
Here is an example:
|
Here is an example:
|
||||||
|
|
||||||
@@ -41,5 +40,3 @@ The type parameter on the `PageProps`, `Handlers`, `Handler`, and
|
|||||||
`HandlerContext` can be used to enforce a TypeScript type to use for the render
|
`HandlerContext` can be used to enforce a TypeScript type to use for the render
|
||||||
data. Fresh enforces during type checking that the types in all of these fields
|
data. Fresh enforces during type checking that the types in all of these fields
|
||||||
are compatible within a single page.
|
are compatible within a single page.
|
||||||
|
|
||||||
[route-handlers]: ./route-handlers
|
|
||||||
|
|||||||
Reference in New Issue
Block a user