diff options
author | 2021-06-11 13:04:33 +0000 | |
---|---|---|
committer | 2021-06-11 13:04:33 +0000 | |
commit | 86694cb8b8ef467bd86ae46e2cbc85ac66c853ca (patch) | |
tree | d84a61de5940743348801b58010af538d01c801d | |
parent | 1bab90653976d767ecc96756309a08f9732fecee (diff) | |
download | astro-86694cb8b8ef467bd86ae46e2cbc85ac66c853ca.tar.gz astro-86694cb8b8ef467bd86ae46e2cbc85ac66c853ca.tar.zst astro-86694cb8b8ef467bd86ae46e2cbc85ac66c853ca.zip |
[ci] yarn format
-rw-r--r-- | docs/api.md | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/docs/api.md b/docs/api.md index ed04ab5a8..d3f5c16cf 100644 --- a/docs/api.md +++ b/docs/api.md @@ -150,17 +150,13 @@ Astro will generate an RSS 2.0 feed at `/feed/[collection].xml` (for example, `/ All ESM modules include a `import.meta` property. Astro adds `import.meta.env` through [Snowpack](https://www.snowpack.dev/). -__import.meta.env.SSR__ can be used to know when rendering on the server. Some times you might want different logic, for example a component that should only be rendered in the client: +**import.meta.env.SSR** can be used to know when rendering on the server. Some times you might want different logic, for example a component that should only be rendered in the client: ```jsx import { h } from 'preact'; -export default function() { - return ( - import.meta.env.SSR ? - <div class="spinner"></div> : - <FancyComponent /> - ) +export default function () { + return import.meta.env.SSR ? <div class="spinner"></div> : <FancyComponent />; } ``` |