Skip to content

Commit 1aa59ea

Browse files
authored
Update README.md
1 parent c8916ba commit 1aa59ea

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ Stores.get(storePtr)?.attach(new ConcreteObserver());
6464

6565
/** @jsx h */
6666
import { h } from "preact";
67-
import { Stores, useStore } from "@stores";
67+
import { Stores, useStore, type Pointer } from "@store";
6868

6969
interface CompAProps {
70-
storePtr: string;
70+
storePtr: Pointer;
7171
}
7272

7373
export default function ComponentA(props: CompAProps) {
@@ -99,10 +99,10 @@ export default function ComponentA(props: CompAProps) {
9999
import { h } from "preact";
100100
import { useState } from "preact/hooks";
101101

102-
import { useStore } from "@store";
102+
import { useStore, type Pointer } from "@store";
103103

104104
interface CompBProps {
105-
storePtr: string;
105+
storePtr: Pointer;
106106
}
107107

108108
export default function ComponentB(props: CompBProps) {
@@ -122,11 +122,13 @@ export default function ComponentB(props: CompBProps) {
122122
/** @jsx h */
123123
import { h } from "preact";
124124

125+
import { Store } from "@store";
126+
125127
import ComponentA from "@islands/componentA.tsx";
126128
import ComponentB from "@islands/componentB.tsx";
127129

128130
export default function Index() {
129-
const storePtr = crypto.randomUUID();
131+
const storePtr = Store.newPointer();
130132

131133
return (
132134
<div>

0 commit comments

Comments
 (0)