diff --git a/example/app.tsx b/example/app.tsx index 558a4c6..c2b0679 100644 --- a/example/app.tsx +++ b/example/app.tsx @@ -23,6 +23,9 @@ const Comp = React.lazy(()=>import("./deep/component.tsx")); export default ()=> { + + const [stack] = React.useContext(Iso.Meta.Context); + return
; }; \ No newline at end of file diff --git a/example/deep/component.tsx b/example/deep/component.tsx index 39f4ed4..1fe0332 100644 --- a/example/deep/component.tsx +++ b/example/deep/component.tsx @@ -13,7 +13,7 @@ export default ()=> console.log("component.tsx render!!") return
- + Component Route is: {routeGet.Path.toString()} a link diff --git a/server.tsx b/server.tsx index 306b179..a0d01ee 100644 --- a/server.tsx +++ b/server.tsx @@ -372,7 +372,8 @@ else if(App && TwindInst) Iso.Fetch.ServerTouched = new Set(); Iso.Fetch.ServerRemove = new Set(); let app = ; - await Prepass(app) + await Prepass(app); + Iso.Meta.Stack = []; let bake = SSR(app); while(Iso.Fetch.ServerBlocking.length) { @@ -381,7 +382,8 @@ else if(App && TwindInst) // at this point, anything that was requested that was not cached, has now been loaded and cached // this next render will use cached resources. using a cached resource (if its "Seed" is true) adds it to the "touched" set. app = ; - await Prepass(app) + await Prepass(app); + Iso.Meta.Stack = []; bake = SSR(app); } @@ -394,7 +396,7 @@ else if(App && TwindInst) Iso.Fetch.ServerTouched = false; Iso.Meta.Meta = Iso.Meta.ComputeFinal(Iso.Meta.Stack); - + console.log(Iso.Meta.Stack); const results = Twind.extract(bake, TwindInst); type = `text/html`;