You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor React SDK hooks to subscribe to auth state via `useSyncExternalStore`. This is a mostly internal refactor to unlock future improvements, but includes a few breaking changes and fixes.
13
+
14
+
Breaking changes:
15
+
16
+
* All `@clerk/react`-based packages: Removes ability to pass in `initialAuthState` to `useAuth`
17
+
* This was added for internal use and is no longer needed
18
+
* Instead pass in `initialState` to the `<ClerkProvider>`, or `dynamic` if using the Next package
19
+
* See your specific SDK documentation for more information on Server Rendering
20
+
*`@clerk/shared`: Removes now unused contexts `ClientContext`, `SessionContext`, `UserContext` and `OrganizationProvider`
21
+
* We do not anticipate public use of these
22
+
* If you were using any of these, file an issue to discuss a path forward as they are no longer available even internally
23
+
24
+
New features:
25
+
26
+
*`@clerk/clerk-js`: `addListener` now takes a `skipInitialEmit` option that can be used to avoid emitting immediately after subscribing
27
+
28
+
Fixes:
29
+
30
+
* A bug where `useAuth` would sometimes briefly return the `initialState` rather than `undefined`
31
+
* This could in certain situations incorrectly lead to a brief `user: null` on the first page after signing in, indicating a signed out state
32
+
* Hydration mismatches in certain rare scenarios where subtrees would suspend and hydrate only after `clerk-js` had loaded fully
0 commit comments