Add Effect v4 support, Fast Refresh tooling, and revamped docs #56
@@ -26,21 +26,18 @@ const AppStateSchema = Schema.Struct({
|
||||
class AppState extends Context.Service<AppState, {
|
||||
readonly lens: Lens.Lens<typeof AppStateSchema.Type>
|
||||
}>()("AppState") {
|
||||
static readonly layer = Layer.effect(
|
||||
AppState,
|
||||
Effect.gen(function*() {
|
||||
return {
|
||||
lens: Lens.fromSubscriptionRef(
|
||||
yield* SubscriptionRef.make<typeof AppStateSchema.Type>({
|
||||
currentUser: {
|
||||
email: "",
|
||||
password: "",
|
||||
},
|
||||
})
|
||||
),
|
||||
}
|
||||
}),
|
||||
)
|
||||
static readonly layer = Layer.effect(AppState, Effect.gen(function*() {
|
||||
return {
|
||||
lens: Lens.fromSubscriptionRef(
|
||||
yield* SubscriptionRef.make<typeof AppStateSchema.Type>({
|
||||
currentUser: {
|
||||
email: "",
|
||||
password: "",
|
||||
},
|
||||
})
|
||||
),
|
||||
}
|
||||
}))
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user