Add Effect v4 support, Fast Refresh tooling, and revamped docs #56

Merged
Thilawyn merged 133 commits from next into master 2026-07-26 02:32:59 +02:00
Showing only changes of commit 7ae5d08555 - Show all commits
+4 -4
View File
@@ -18,7 +18,7 @@ scopes. The usual pattern is:
`effect-fc` re-exports the `Lens` and `Subscribable` modules from `effect-fc` re-exports the `Lens` and `Subscribable` modules from
[`effect-lens`](https://github.com/Thiladev/effect-lens) for convenience. The [`effect-lens`](https://github.com/Thiladev/effect-lens) for convenience. The
core data model and transformation APIs belong to `effect-lens`, so check the core data model and transformation APIs belong to `effect-lens`, so check the
`effect-lens` documentation for the full Lens/Subscribable API. [`effect-lens` documentation](https://github.com/Thiladev/effect-lens/tree/master/packages/effect-lens) for the full Lens/Subscribable API.
## Where To Store State ## Where To Store State
@@ -124,11 +124,11 @@ const CounterControlsView = Component.make("CounterControls")(
const increment = yield* Component.useCallbackSync( const increment = yield* Component.useCallbackSync(
() => Lens.update(state.count, (n) => n + 1), () => Lens.update(state.count, (n) => n + 1),
[state.count], [],
) )
const reset = yield* Component.useCallbackSync( const reset = yield* Component.useCallbackSync(
() => Lens.set(state.count, 0), () => Lens.set(state.count, 0),
[state.count], [],
) )
return ( return (
@@ -239,4 +239,4 @@ Updating the focused `name` Lens through `Lens.useState` updates the parent
For focusing into nested state, deriving lenses, custom write behavior, and the For focusing into nested state, deriving lenses, custom write behavior, and the
complete API, refer to the complete API, refer to the
[`effect-lens` documentation](https://github.com/Thiladev/effect-lens). [`effect-lens` documentation](https://github.com/Thiladev/effect-lens/tree/master/packages/effect-lens).