Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

IsRestoringProvider.ts

7 lines261 Bytes

1import { createContext } from 'preact'
2import { useContext } from 'preact/hooks'
3​
4const IsRestoringContext = createContext(false)
5​
6export const useIsRestoring = () => useContext(IsRestoringContext)
7export const IsRestoringProvider = IsRestoringContext.Provider