0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-03-10 23:01:26 -05:00
astro/examples/framework-solid
2021-08-13 23:32:55 +00:00
..
src Reduce meta viewport tag (#1006) 2021-08-04 08:30:58 -04:00
.gitignore
.npmrc
astro.config.mjs
package.json Version Packages (next) (#1092) 2021-08-12 01:39:34 -07:00
README.md
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.