@@ -1,5 +1,5 @@
|
||||
import { Effect, Layer, SubscriptionRef } from "effect"
|
||||
import { Component, Lens, ReactRuntime, Subscribable } from "effect-fc-next"
|
||||
import { Component, Lens, ReactRuntime, View } from "effect-fc-next"
|
||||
import { StrictMode } from "react"
|
||||
import { createRoot } from "react-dom/client"
|
||||
import "./index.css"
|
||||
@@ -10,7 +10,7 @@ const Counter = Component.make("Counter")(function*() {
|
||||
SubscriptionRef.make(0),
|
||||
Lens.fromSubscriptionRef,
|
||||
))
|
||||
const [value] = yield* Subscribable.useAll([count])
|
||||
const [value] = yield* View.useAll([count])
|
||||
const increment = yield* Component.useCallbackSync(
|
||||
() => Lens.update(count, n => n + 1),
|
||||
[count],
|
||||
|
||||
Reference in New Issue
Block a user