This commit is contained in:
@@ -28,16 +28,16 @@ const RouteComponent = Component.make(function* RouteComponent() {
|
||||
Component.withRuntime(runtime.context)
|
||||
)
|
||||
|
||||
const SubComponent = Component.make(function* SubComponent(props: { readonly value?: string }) {
|
||||
class SubComponent extends Component.make(function* SubComponent(props: { readonly value?: string }) {
|
||||
const id = yield* makeUuid4.pipe(Effect.provide(GetRandomValues.CryptoRandom))
|
||||
return <Text>{id}</Text>
|
||||
})
|
||||
}) {}
|
||||
|
||||
const MemoizedSubComponent = SubComponent.pipe(
|
||||
class MemoizedSubComponent extends SubComponent.pipe(
|
||||
Component.memo,
|
||||
Component.suspense,
|
||||
Component.memo,
|
||||
)
|
||||
) {}
|
||||
type T = typeof MemoizedSubComponent extends Component.Memoized<infer P> ? P : never
|
||||
|
||||
export const Route = createFileRoute("/dev/memo")({
|
||||
|
||||
Reference in New Issue
Block a user