Skip to content

Commit 2de1d1e

Browse files
authored
chore(preact-query/utils): disable 'react/exhaustive-deps' for the stable '_instance' to keep the upstream 'useSyncExternalStore' (#12289)
1 parent 67a8784 commit 2de1d1e

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎packages/preact-query/src/utils.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export function useSyncExternalStore(
3636
if (didSnapshotChange(_instance)) {
3737
forceUpdate({ _instance })
3838
}
39+
// oxlint-disable-next-line react/exhaustive-deps -- '_instance' never changes, matching the upstream implementation
3940
}, [subscribe, value, getSnapshot])
4041

4142
useEffect(() => {
@@ -48,6 +49,7 @@ export function useSyncExternalStore(
4849
forceUpdate({ _instance })
4950
}
5051
})
52+
// oxlint-disable-next-line react/exhaustive-deps -- '_instance' never changes, matching the upstream implementation
5153
}, [subscribe])
5254

5355
return value

0 commit comments

Comments
 (0)