feat: layered and scoped middleware and context state (#139)
Co-authored-by: Luca Casonato <hello@lcas.dev>
This commit is contained in:
co-authored by
Luca Casonato
parent
b36f2c1a43
commit
8d4e77f4ac
@@ -11,7 +11,7 @@ export function render(ctx: RenderContext, render: RenderFn) {
|
||||
const snapshot = ctx.state.get("twindSnapshot") as unknown[] | null;
|
||||
sheet.reset(snapshot || undefined);
|
||||
render();
|
||||
ctx.styles.splice(0, ctx.styles.length, ...sheet.target);
|
||||
ctx.styles.splice(0, ctx.styles.length, ...(sheet).target);
|
||||
const newSnapshot = sheet.reset();
|
||||
ctx.state.set("twindSnapshot", newSnapshot);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user