[ci] yarn format

This commit is contained in:
matthewp 2021-06-11 13:04:33 +00:00 committed by GitHub Actions
parent 1bab906539
commit 86694cb8b8

View file

@ -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 />;
}
```