3.3.2 • Published 5 days ago

@astrojs/react v3.3.2

Weekly downloads
-
License
MIT
Repository
github
Last release
5 days ago

@astrojs/react ⚛️

This Astro integration enables server-side rendering and client-side hydration for your React components.

Installation

There are two ways to add integrations to your project. Let's try the most convenient option first!

astro add command

Astro includes a CLI tool for adding first party integrations: astro add. This command will: 1. (Optionally) Install all necessary dependencies and peer dependencies 2. (Also optionally) Update your astro.config.* file to apply this integration

To install @astrojs/react, run the following from your project directory and follow the prompts:

# Using NPM
npx astro add react
# Using Yarn
yarn astro add react
# Using PNPM
pnpx astro add react

If you run into any hiccups, feel free to log an issue on our GitHub and try the manual installation steps below.

Install dependencies manually

First, install the @astrojs/react integration like so:

npm install @astrojs/react

Most package managers will install associated peer dependencies as well. Still, if you see a "Cannot find package 'react'" (or similar) warning when you start up Astro, you'll need to install react and react-dom:

npm install react react-dom

Now, apply this integration to your astro.config.* file using the integrations property:

astro.config.mjs

import react from '@astrojs/react';

export default {
  // ...
  integrations: [react()],
}

Getting started

To use your first React component in Astro, head to our UI framework documentation. You'll explore:

  • 📦 how framework components are loaded,
  • 💧 client-side hydration options, and
  • 🪆 opportunities to mix and nest frameworks together

Also check our Astro Integration Documentation for more on integrations.

3.3.2

6 days ago

3.3.1

15 days ago

3.3.0

27 days ago

3.2.0

30 days ago

3.1.1

1 month ago

3.1.0

2 months ago

3.0.10

3 months ago

3.0.9

4 months ago

3.0.8

5 months ago

3.0.7

5 months ago

3.0.7-beta.0

5 months ago

3.0.6

6 months ago

3.0.5

6 months ago

3.0.4

7 months ago

2.2.2

9 months ago

3.0.3

7 months ago

3.0.2

8 months ago

3.0.1

8 months ago

3.0.0

8 months ago

3.0.0-beta.1

9 months ago

3.0.0-beta.0

9 months ago

3.0.0-beta.3

9 months ago

3.0.0-beta.2

9 months ago

2.3.0

9 months ago

2.3.2

9 months ago

2.3.1

9 months ago

3.0.0-rc.6

8 months ago

3.0.0-rc.5

9 months ago

3.0.0-rc.4

9 months ago

2.2.1

11 months ago

2.1.2

1 year ago

2.2.0

12 months ago

2.1.3

1 year ago

2.1.1

1 year ago

2.1.0

1 year ago

2.0.2

1 year ago

2.0.0-beta.0

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.2.0

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.0-next.0

2 years ago

1.0.0

2 years ago

0.4.1-pre.0

2 years ago

0.4.1-pre.1

2 years ago

0.4.1-pre.2

2 years ago

0.3.0

2 years ago

0.2.1

2 years ago

0.2.0

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.3.1

2 years ago

0.1.3

2 years ago

0.4.3

2 years ago

0.4.2

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.2

2 years ago

0.0.2-next.0

2 years ago

0.0.1

2 years ago