@@ -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>
|
||||||
|
|||||||
@@ -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 />
|
||||||
|
|||||||
@@ -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 />
|
||||||
|
|||||||
Reference in New Issue
Block a user