@@ -23,7 +23,7 @@ const SubComponent = Component.makeUntraced("SubComponent")(function*() {
|
||||
const ContextView = Component.makeUntraced("ContextView")(function*() {
|
||||
const [serviceValue, setServiceValue] = React.useState("test")
|
||||
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 (
|
||||
<Container>
|
||||
|
||||
@@ -118,7 +118,7 @@ class RegisterFormView extends Component.makeUntraced("RegisterFormView")(functi
|
||||
const RegisterPage = Component.makeUntraced("RegisterPage")(function*() {
|
||||
const RegisterFormViewFC = yield* Effect.provide(
|
||||
RegisterFormView.use,
|
||||
yield* Component.useContext(RegisterForm.Default),
|
||||
yield* Component.useContextFromLayer(RegisterForm.Default),
|
||||
)
|
||||
|
||||
return <RegisterFormViewFC />
|
||||
|
||||
@@ -11,7 +11,7 @@ const TodosStateLive = TodosState.Default("todos")
|
||||
const Index = Component.makeUntraced("Index")(function*() {
|
||||
const TodosFC = yield* Effect.provide(
|
||||
Todos.use,
|
||||
yield* Component.useContext(TodosStateLive),
|
||||
yield* Component.useContextFromLayer(TodosStateLive),
|
||||
)
|
||||
|
||||
return <TodosFC />
|
||||
|
||||
Reference in New Issue
Block a user