0.2.4 #38

Merged
Thilawyn merged 44 commits from next into master 2026-03-16 00:30:17 +01:00
3 changed files with 3 additions and 3 deletions
Showing only changes of commit 8e81ec85de - Show all commits

View File

@@ -23,7 +23,7 @@ const SubComponent = Component.makeUntraced("SubComponent")(function*() {
const ContextView = Component.makeUntraced("ContextView")(function*() { const ContextView = Component.makeUntraced("ContextView")(function*() {
const [serviceValue, setServiceValue] = React.useState("test") const [serviceValue, setServiceValue] = React.useState("test")
const SubServiceLayer = React.useMemo(() => SubService.Default(serviceValue), [serviceValue]) const SubServiceLayer = React.useMemo(() => SubService.Default(serviceValue), [serviceValue])
const SubComponentFC = yield* Effect.provide(SubComponent.use, yield* Component.useContext(SubServiceLayer)) const SubComponentFC = yield* Effect.provide(SubComponent.use, yield* Component.useContextFromLayer(SubServiceLayer))
return ( return (
<Container> <Container>

View File

@@ -118,7 +118,7 @@ class RegisterFormView extends Component.makeUntraced("RegisterFormView")(functi
const RegisterPage = Component.makeUntraced("RegisterPage")(function*() { const RegisterPage = Component.makeUntraced("RegisterPage")(function*() {
const RegisterFormViewFC = yield* Effect.provide( const RegisterFormViewFC = yield* Effect.provide(
RegisterFormView.use, RegisterFormView.use,
yield* Component.useContext(RegisterForm.Default), yield* Component.useContextFromLayer(RegisterForm.Default),
) )
return <RegisterFormViewFC /> return <RegisterFormViewFC />

View File

@@ -11,7 +11,7 @@ const TodosStateLive = TodosState.Default("todos")
const Index = Component.makeUntraced("Index")(function*() { const Index = Component.makeUntraced("Index")(function*() {
const TodosFC = yield* Effect.provide( const TodosFC = yield* Effect.provide(
Todos.use, Todos.use,
yield* Component.useContext(TodosStateLive), yield* Component.useContextFromLayer(TodosStateLive),
) )
return <TodosFC /> return <TodosFC />