d9084ff4ad
* Implement fallback capability This makes it possible for a dynamic component to render fallback content on the server. The mechanism is a special `static` prop passed to the component. If `static` is true then the component knows it can render static content. Putting aside the word `static`, is this the right approach? I think giving components the flexibility to make the decision themselves *is* the right approach. However in this case we have a special property that is passed in non-explicitly. I think we have to do it this way because if the caller passes in a prop it will get serialized and appear on the client. By making this something we *add* during rendering, it only happens on the server (and only when using `:load`). Assuming this is the right approach, is `static` the right name for this prop? Other candidates: * `server` That's all I have! * Use `import.meta.env.astro` to tell if running in SSR mode. * Run formatter |
||
---|---|---|
.. | ||
astro | ||
public | ||
.gitignore | ||
.prettierrc | ||
.stylelintrc.js | ||
astro.config.mjs | ||
LICENSE | ||
package-lock.json | ||
package.json | ||
README.md | ||
vercel.json |
Astro Demo
Getting setup
-
Checkout Astro at: https://github.com/snowpackjs/astro
- Install and build Astro:
npm install npm run build
- Link Astro:
npm link
-
In this project link Astro and install other deps:
npm link astro
npm install
- Run the Astro dev environment.
npm run start
- Build the website. (Not yet working.)
npm run build