From c492408969c819f3efcdccd96ba8b0c36d3e489e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Valverd=C3=A9?= Date: Tue, 9 Jun 2026 14:50:25 +0200 Subject: [PATCH] Docs --- packages/docs/docs/getting-started.md | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/packages/docs/docs/getting-started.md b/packages/docs/docs/getting-started.md index ec691f4..be19515 100644 --- a/packages/docs/docs/getting-started.md +++ b/packages/docs/docs/getting-started.md @@ -10,26 +10,28 @@ component body you can yield services, run Effects, subscribe to Effect-powered state, and still export a normal React function component at the edge of your app. -This guide starts with the smallest useful setup: - -1. Install `effect-fc` with its peer dependencies. -2. Create a React runtime from an Effect `Layer`. -3. Wrap your React app with `ReactRuntime.Provider`. -4. Write a component with `Component.make`. -5. Convert it to a React component with `Component.withRuntime`. - ## Install Install `effect-fc` alongside `effect` and React 19.2 or newer: ```bash npm2yarn -npm install effect-fc effect react react-dom +npm install effect-fc effect react +``` +```bash npm2yarn +npm install --save-dev @types/react ``` -If your project uses TypeScript, also install React's type packages: +`effect-fc` is not opinionated about the React platform. Use it with web, +native, custom renderers, or any environment where React components can run. +Then install the platform-specific React packages for your target. + +For web apps, install React DOM: ```bash npm2yarn -npm install --save-dev @types/react @types/react-dom +npm install react-dom +``` +```bash npm2yarn +npm install --save-dev @types/react-dom ``` ## Create A Runtime