-
-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(router): createPages #293
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 72f617d:
|
Why not the traditional file-based routing? Just curious. |
config-based router matches better for non-node env and for vite/rollup limitation. |
|
Thanks. Why hydration mismatch only on windows... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Subject: [PATCH] fix: add suspense
---
Index: packages/waku/src/router/client.ts
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/packages/waku/src/router/client.ts b/packages/waku/src/router/client.ts
--- a/packages/waku/src/router/client.ts (revision 7d50ea37986f14e884897c1af0e156db40bb824d)
+++ b/packages/waku/src/router/client.ts (date 1703307050084)
@@ -10,6 +10,7 @@
useState,
useTransition,
Fragment,
+ Suspense,
} from 'react';
import type { ComponentProps, FunctionComponent, ReactNode } from 'react';
@@ -224,13 +225,17 @@
);
return createElement(
- Fragment,
- null,
- createElement(Slot, { id: SHOULD_SKIP_ID }),
- createElement(
- RouterContext.Provider,
- { value: { loc, changeLocation, prefetchLocation } },
- children,
+ Suspense,
+ null,
+ createElement(
+ Fragment,
+ null,
+ createElement(Slot, { id: SHOULD_SKIP_ID }),
+ createElement(
+ RouterContext.Provider,
+ { value: { loc, changeLocation, prefetchLocation } },
+ children,
+ ),
),
);
}
This will fix, but hydration error still |
This reverts commit f32fe55.
btw, I don't know how the windows CI failing issue was resolved. |
Close #246