feat: support async route components (#1388)
This commit is contained in:
+2
-2
@@ -15,9 +15,9 @@ export default function(state) { hydrate(options, state); }`;
|
||||
return {
|
||||
name: "twind",
|
||||
entrypoints: { "main": main },
|
||||
render(ctx) {
|
||||
async renderAsync(ctx) {
|
||||
sheet.reset(undefined);
|
||||
const res = ctx.render();
|
||||
const res = await ctx.renderAsync();
|
||||
const cssTexts = [...sheet.target];
|
||||
const snapshot = sheet.reset();
|
||||
const scripts = [];
|
||||
|
||||
+2
-2
@@ -15,8 +15,8 @@ export default function(state) { hydrate(options, state); }`;
|
||||
return {
|
||||
name: "twind",
|
||||
entrypoints: { "main": main },
|
||||
render(ctx) {
|
||||
const res = ctx.render();
|
||||
async renderAsync(ctx) {
|
||||
const res = await ctx.renderAsync();
|
||||
const cssText = stringify(sheet.target);
|
||||
const scripts = [];
|
||||
if (res.requiresHydration) {
|
||||
|
||||
Reference in New Issue
Block a user