Skip to content

Commit e565364

Browse files
committed
Upgrade @react-hookz/web
1 parent 010f12a commit e565364

File tree

3 files changed

+31
-20
lines changed

3 files changed

+31
-20
lines changed

package-lock.json

Lines changed: 25 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/analytics-nextjs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"react-dom": "^17.x || ^18.x"
3232
},
3333
"dependencies": {
34-
"@react-hookz/web": "^14.2.2",
34+
"@react-hookz/web": "^25.0.1",
3535
"@segment/analytics-next": "^1.66.0",
3636
"js-cookie": "^3.0.1",
3737
"next-plausible": "^3.12.0"

packages/analytics-nextjs/src/hooks/useAnalytics.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@ export function useAnalytics() {
3737
const analyticsRef = useSyncedRef(analytics);
3838
const plausibleRef = useSyncedRef(plausible);
3939

40-
const [deferredIdentity, setDeferredIdentity, removeDeferredIdentity] =
41-
useLocalStorageValue<DeferredIdentity>(DEFERRED_IDENTITY_STORAGE_KEY);
40+
const {
41+
value: deferredIdentity,
42+
set: setDeferredIdentity,
43+
remove: removeDeferredIdentity,
44+
} = useLocalStorageValue<DeferredIdentity>(DEFERRED_IDENTITY_STORAGE_KEY);
4245
const { add: addToQueue, remove: removeFromQueue, first: firstInQueue } = useQueue<Function>();
4346

4447
// The prezly traits should be placed in the root of the event when sent to the API.

0 commit comments

Comments
 (0)