Commit 8d9e85d
committed
fix(web): eliminate Clerk UserButton hydration mismatch in app header
Clerk's <UserButton> mounts a client-only div not present in SSR HTML, throwing a
hydration mismatch on every (app) page and forcing a client tree regeneration. Gated it
behind <ClerkLoaded>/<ClerkLoading> (idiomatic) so SSR + first client render match.
Verified: 0 hydration errors after reload (was recurring).1 parent 5b4a12a commit 8d9e85d
1 file changed
Lines changed: 9 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
65 | 72 | | |
66 | 73 | | |
67 | 74 | | |
| |||
0 commit comments