Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 1.25 KB

README.md

File metadata and controls

31 lines (20 loc) · 1.25 KB

@void/react

React adapter for Void. Build server-rendered pages with typed server loaders, forms, layouts, and interactive islands.

Requires React 19. Navigation uses transitions and Suspense to keep the UI responsive while the next page loads.

Setup

For a new app, run npx void init and choose React. To add the adapter to an existing Void app:

npm install @void/react

Add the adapter to your Vite config. It includes the framework's Vite plugin:

import { voidReact } from '@void/react/plugin';
import { defineConfig } from 'vite';
import { voidPlugin } from 'void';

export default defineConfig({
  plugins: [voidPlugin(), voidReact()],
});

Documentation

Follow Pages Routing to add pages, then use loaders, forms, and layouts. See the adapter API reference for plugin options and runtime helpers.

Read the Void documentation online or use the Markdown guides and references in node_modules/void/docs/, included with the void package.