diff options
author | 2021-09-16 08:06:22 -0700 | |
---|---|---|
committer | 2021-09-16 08:06:22 -0700 | |
commit | cb7a957f413a9af0651266769b5a6a4a9996aafa (patch) | |
tree | 98aa0dbd5d19c8cc7787bf79c54f4dc1264e4636 /examples/framework-react/README.md | |
parent | c4634e5ea6f2c0e86216251831525497c9821daa (diff) | |
download | astro-cb7a957f413a9af0651266769b5a6a4a9996aafa.tar.gz astro-cb7a957f413a9af0651266769b5a6a4a9996aafa.tar.zst astro-cb7a957f413a9af0651266769b5a6a4a9996aafa.zip |
update examples for stackblitz (#1379)
Diffstat (limited to 'examples/framework-react/README.md')
-rw-r--r-- | examples/framework-react/README.md | 35 |
1 files changed, 4 insertions, 31 deletions
diff --git a/examples/framework-react/README.md b/examples/framework-react/README.md index 3701554be..f6f9a7941 100644 --- a/examples/framework-react/README.md +++ b/examples/framework-react/README.md @@ -1,38 +1,11 @@ -# Using React with Astro +# Astro + React Example -This example showcases Astro's built-in support for [React](https://reactjs.org/). - -## Installation - -### Automatic - -Bootstrap your Astro project with this template! - -```shell +``` npm init astro -- --template framework-react ``` -### Manual - -To use React components in your Astro project: - -1. Install `@astrojs/renderer-react` - - ```shell - npm i @astrojs/renderer-react - ``` - -2. Add `"@astrojs/renderer-react"` to your `renderers` in `astro.config.mjs`. - - ```js - export default { - renderers: [ - "@astrojs/renderer-react", - // optionally, others... - ] - } - ``` +[](https://stackblitz.com/github/snowpackjs/astro/tree/latest/examples/framework-react) -## Usage +This example showcases Astro working with [React](https://reactjs.org/). Write your React components as `.jsx` or `.tsx` files in your project. |