astro/examples/framework-solid
github-actions[bot] 509c69627b
Version Packages (#882)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2021-07-27 12:41:42 -04:00
..
src [ci] yarn format 2021-07-21 23:11:40 +00: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 [ci] yarn format 2021-07-21 23:11:40 +00:00
package.json Version Packages (#882) 2021-07-27 12:41:42 -04:00
README.md Expose JSX compilation to renderers (#588) 2021-07-21 18:10:03 -05: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.