Fix: No Matching Renderer Found in Astro

Error message:
No matching renderer found.
Components & Hydration 2025-01-25

What Causes This Error?

This error occurs when you use a component from a framework (React, Vue, Svelte, etc.) but haven’t installed or configured the corresponding Astro integration. Astro needs renderers to understand how to process framework-specific components.

The Problem

---
// src/pages/index.astro
import Counter from '../components/Counter.jsx'; // React component
---

<!-- ❌ No React integration installed -->
<Counter client:load />

The Fix

Install the Integration

# For React
npx astro add react

# For Vue
npx astro add vue

# For Svelte
npx astro add svelte

# For Solid
npx astro add solid-js

# For Preact
npx astro add preact

Configure Manually

// astro.config.mjs
import { defineConfig } from 'astro/config';
import react from '@astrojs/react';

export default defineConfig({
  integrations: [react()],
});

Common Scenarios

Multiple Frameworks

// astro.config.mjs
import { defineConfig } from 'astro/config';
import react from '@astrojs/react';
import vue from '@astrojs/vue';
import svelte from '@astrojs/svelte';

export default defineConfig({
  integrations: [
    react(),
    vue(),
    svelte(),
  ],
});

React with JSX

# Install dependencies
npm install @astrojs/react react react-dom
// astro.config.mjs
import { defineConfig } from 'astro/config';
import react from '@astrojs/react';

export default defineConfig({
  integrations: [react()],
});
---
// Now React components work
import Button from '../components/Button.jsx';
import Card from '../components/Card.tsx';
---

<Button client:load />
<Card client:visible />

Vue Single-File Components

npm install @astrojs/vue vue
// astro.config.mjs
import { defineConfig } from 'astro/config';
import vue from '@astrojs/vue';

export default defineConfig({
  integrations: [vue()],
});
---
import MyComponent from '../components/MyComponent.vue';
---

<MyComponent client:load />

Svelte Components

npm install @astrojs/svelte svelte
// astro.config.mjs
import { defineConfig } from 'astro/config';
import svelte from '@astrojs/svelte';

export default defineConfig({
  integrations: [svelte()],
});

File Extension Matters

# Each framework has specific file extensions
.jsx, .tsx  → React
.vue        → Vue
.svelte     → Svelte
.solid.jsx  → Solid (or configure include patterns)

Custom Include Patterns

// astro.config.mjs
import { defineConfig } from 'astro/config';
import react from '@astrojs/react';
import solid from '@astrojs/solid-js';

export default defineConfig({
  integrations: [
    react({
      include: ['**/react/*'],
    }),
    solid({
      include: ['**/solid/*'],
    }),
  ],
});

Quick Checklist

  • Install integration: npx astro add <framework>
  • Add integration to astro.config.mjs
  • Install framework dependencies
  • Use correct file extensions
  • Restart dev server after config changes