File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -64,10 +64,10 @@ Stores.get(storePtr)?.attach(new ConcreteObserver());
6464
6565/** @jsx h */
6666import { h } from " preact" ;
67- import { Stores , useStore } from " @stores " ;
67+ import { Stores , useStore , type Pointer } from " @store " ;
6868
6969interface CompAProps {
70- storePtr: string ;
70+ storePtr: Pointer ;
7171}
7272
7373export default function ComponentA(props : CompAProps ) {
@@ -99,10 +99,10 @@ export default function ComponentA(props: CompAProps) {
9999import { h } from " preact" ;
100100import { useState } from " preact/hooks" ;
101101
102- import { useStore } from " @store" ;
102+ import { useStore , type Pointer } from " @store" ;
103103
104104interface CompBProps {
105- storePtr: string ;
105+ storePtr: Pointer ;
106106}
107107
108108export default function ComponentB(props : CompBProps ) {
@@ -122,11 +122,13 @@ export default function ComponentB(props: CompBProps) {
122122/** @jsx h */
123123import { h } from " preact" ;
124124
125+ import { Store } from " @store" ;
126+
125127import ComponentA from " @islands/componentA.tsx" ;
126128import ComponentB from " @islands/componentB.tsx" ;
127129
128130export default function Index() {
129- const storePtr = crypto . randomUUID ();
131+ const storePtr = Store . newPointer ();
130132
131133 return (
132134 <div >
You can’t perform that action at this time.
0 commit comments