UNPKG

274 BTypeScriptView Raw
1/**
2 * This is definitely not compatible with concurrent mode, but we don't have a solution for sync state yet.
3 */
4export default function useSyncState<T>(initialState?: (() => T) | T): readonly [T, () => T, (state: T) => void, (callback: () => void) => void, () => void];