astro/examples/framework-solid
Fred K. Schott f9cd031033
Add zod schema validation (#1198)
* add zod schema validation

* update pageUrlFormat config name

* add trailing slash support to config
2021-08-23 14:07:03 -07:00
..
public make example favicons prefer non-dark mode 2021-08-17 22:33:42 -07:00
src cleanup example favicons 2021-08-16 14:34:08 -07:00
.gitignore Expose JSX compilation to renderers (#588) 2021-07-21 18:10:03 -05:00
.npmrc Expose JSX compilation to renderers (#588) 2021-07-21 18:10:03 -05:00
astro.config.mjs Add zod schema validation (#1198) 2021-08-23 14:07:03 -07:00
package.json Version Packages (#1181) 2021-08-23 15:59:55 -04:00
README.md Expose JSX compilation to renderers (#588) 2021-07-21 18:10:03 -05:00
tsconfig.json [ci] yarn format 2021-08-13 23:32:55 +00:00

Using Solid with Astro

This example showcases Astro's built-in support for Solid.

Installation

Automatic

Bootstrap your Astro project with this template!

npm init astro --template framework-solid

Manual

To use Solid components in your Astro project:

  1. Install @astrojs/renderer-solid

    npm i @astrojs/renderer-solid
    
  2. Add "@astrojs/renderer-solid" to your renderers in astro.config.mjs.

    export default {
      renderers: [
        "@astrojs/renderer-solid",
        // optionally, others...
      ]
    }
    

Usage

Write your Solid components as .jsx or .tsx files in your project.