2b1c6aeda9
## 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
42 lines
1.1 KiB
JSON
42 lines
1.1 KiB
JSON
{
|
|
"name": "@effect-view/example",
|
|
"version": "0.0.0",
|
|
"type": "module",
|
|
"private": true,
|
|
"scripts": {
|
|
"build": "tsc -b && vite build",
|
|
"dev": "vite",
|
|
"lint:tsc": "tsc -b --noEmit",
|
|
"lint:biome": "biome lint",
|
|
"preview": "vite preview",
|
|
"clean:cache": "rm -rf .turbo node_modules/.tmp node_modules/.vite* .tanstack",
|
|
"clean:dist": "rm -rf dist",
|
|
"clean:modules": "rm -rf node_modules"
|
|
},
|
|
"devDependencies": {
|
|
"@effect-view/vite-plugin": "workspace:*",
|
|
"@tanstack/react-router": "^1.170.10",
|
|
"@tanstack/react-router-devtools": "^1.167.0",
|
|
"@tanstack/router-plugin": "^1.168.13",
|
|
"@types/react": "^19.2.15",
|
|
"@types/react-dom": "^19.2.3",
|
|
"@vitejs/plugin-react": "^6.0.2",
|
|
"globals": "^17.6.0",
|
|
"react": "^19.2.6",
|
|
"react-dom": "^19.2.6",
|
|
"vite": "^8.0.16"
|
|
},
|
|
"dependencies": {
|
|
"@effect/platform-browser": "4.0.0-beta.102",
|
|
"@radix-ui/themes": "^3.3.0",
|
|
"effect": "4.0.0-beta.102",
|
|
"effect-view": "workspace:*",
|
|
"react-icons": "^5.6.0"
|
|
},
|
|
"overrides": {
|
|
"@types/react": "^19.2.15",
|
|
"effect": "4.0.0-beta.102",
|
|
"react": "^19.2.6"
|
|
}
|
|
}
|