2b1c6aeda988cf9b7b215e075963c78bb7fce36f
## Summary
- Replace auto-running `service` constructors with explicit `make(...).pipe(thenRun)` lifecycle pipelines.
- Add scoped, schedule-driven Query refreshes with `Query.withScheduledRefresh`.
- Upgrade the Effect v4 stack to beta 102.
- Add `@effect-view/vite-plugin` to the publish workflow.
- Update examples and documentation for the new APIs.
## Breaking changes
The following constructors have been replaced:
- `Query.service(options)` → `Query.make(options).pipe(Query.thenRun)`
- `QueryClient.service(options)` → `QueryClient.make(options).pipe(QueryClient.thenRun)`
- `MutationForm.service(options)` → `MutationForm.make(options).pipe(MutationForm.thenRun)`
- `LensForm.service(options)` → `LensForm.make(options).pipe(LensForm.thenRun)`
This separates object construction from starting its scoped background behavior.
## Scheduled Query refreshes
Queries can now be refreshed with any Effect `Schedule`:
```ts
const query = yield* Query.make(options).pipe(
Query.thenRun,
Query.withScheduledRefresh(Schedule.spaced("5 minutes")),
)
---------
Co-authored-by: Julien Valverdé <julien.valverde@mailo.com>
Reviewed-on: #68
Effect View Monorepo
Write React components as typed Effect programs.
This repository contains Effect View, its documentation, development examples, and supporting tooling. Effect View brings Effect's typed services, resource safety, concurrency, and data modeling to React while keeping ordinary React components, hooks, and JSX.
Packages
| Package | Description |
|---|---|
effect-view |
The Effect View library for Effect v4 and React 19. |
@effect-view/vite-plugin |
Vite Fast Refresh support for Effect View components. |
docs |
The Effect View documentation, built with Docusaurus. |
example |
Example application using Effect View and Effect v4. |
effect-fc |
Legacy Effect v3 package. |
effect-fc-example |
Example application for the legacy package. |
Development
The monorepo uses Bun workspaces and Turborepo.
bun install
Run checks and builds from the repository root:
bun run lint:tsc
bun run lint:biome
bun run test
bun run build
Start the Effect View example or documentation site:
bun run --cwd packages/example dev
bun run --cwd packages/docs start
Documentation
Read the documentation at thila.dev/effect-view.
License
Description
Write React function components using Effect generators!
https://thila.dev/effect-view
Languages
TypeScript
96.7%
CSS
3%
HTML
0.2%