diff options
author | 2021-07-07 20:10:09 +0000 | |
---|---|---|
committer | 2021-07-07 20:10:09 +0000 | |
commit | 1bbe98ae54eb6018184fdc3875fe689775510ad6 (patch) | |
tree | eb8500d84704793c0d5b711f2e8f1b3822a83532 /docs/guides/data-fetching.md | |
parent | 53fcae1a9a26e3e2e9d6aca7ec71acc13a3556ea (diff) | |
download | astro-1bbe98ae54eb6018184fdc3875fe689775510ad6.tar.gz astro-1bbe98ae54eb6018184fdc3875fe689775510ad6.tar.zst astro-1bbe98ae54eb6018184fdc3875fe689775510ad6.zip |
[ci] yarn format
Diffstat (limited to 'docs/guides/data-fetching.md')
-rw-r--r-- | docs/guides/data-fetching.md | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/docs/guides/data-fetching.md b/docs/guides/data-fetching.md index 29a5bb160..44c25f90e 100644 --- a/docs/guides/data-fetching.md +++ b/docs/guides/data-fetching.md @@ -8,6 +8,7 @@ Astro support `fetch()` and "top-level await" to help you do remote data fetchin **Important:** These are not yet available inside of non-page Astro components. Instead, do all of your data loading inside of your pages, and then pass them to your components as props. ## Example + ```astro // Example: src/pages/foo.astro // top-level `fetch()` and `await` are both supported natively in Astro (pages only). @@ -22,4 +23,4 @@ const allPokemon = allPokemonResult.results; {allPokemon.map((pokemon) => (<h1>{pokemon.name}</h1>))} </body> </html> -```
\ No newline at end of file +``` |