Update docs
Lint / lint (push) Failing after 56s

This commit is contained in:
Julien Valverdé
2026-07-26 00:32:33 +02:00
parent 926eba0570
commit d0fa8f04a2
4 changed files with 29 additions and 6 deletions
+27
View File
@@ -35,6 +35,33 @@ Effect View is not tied to React DOM. For React Native or another renderer,
install that renderer instead of `react-dom` and keep the rest of the setup the
same.
## Set up hot reloading with Vite
Install the Effect View Vite plugin to preserve component state while editing
Effect View components:
```bash npm2yarn
npm install --save-dev @effect-view/vite-plugin
```
Add `effectViewPlugin()` before the React plugin in your Vite configuration:
```ts title="vite.config.ts"
import { effectViewPlugin } from "@effect-view/vite-plugin"
import react from "@vitejs/plugin-react"
import { defineConfig } from "vite"
export default defineConfig({
plugins: [
effectViewPlugin(),
react(),
],
})
```
Vite is the only bundler supported for Effect View hot reloading at the moment.
Support for other bundlers will follow.
## Create the runtime
`ReactRuntime` owns a managed Effect runtime. Define it at module scope from the