This commit is contained in:
@@ -12,14 +12,6 @@ export const Route = createFileRoute("/")({
|
|||||||
component: Component.make(function* Index() {
|
component: Component.make(function* Index() {
|
||||||
const context = yield* Hook.useContext(TodosStateLive, { finalizerExecutionMode: "fork" })
|
const context = yield* Hook.useContext(TodosStateLive, { finalizerExecutionMode: "fork" })
|
||||||
return yield* Effect.provide(Component.use(Todos, Todos => <Todos />), context)
|
return yield* Effect.provide(Component.use(Todos, Todos => <Todos />), context)
|
||||||
|
|
||||||
// const context = yield* Hook.useContextAsync(TodosStateLive)
|
|
||||||
// return yield* AsyncData.match(context, {
|
|
||||||
// NoData: () => Effect.succeed(<Text>No data.</Text>),
|
|
||||||
// Loading: () => Effect.succeed(<Text>Loading...</Text>),
|
|
||||||
// Failure: () => Effect.succeed(<Text>Failed.</Text>),
|
|
||||||
// Success: context => Effect.provide(Component.use(Todos, Todos => <Todos />), context),
|
|
||||||
// })
|
|
||||||
}).pipe(
|
}).pipe(
|
||||||
Component.withRuntime(runtime.context)
|
Component.withRuntime(runtime.context)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user