UNPKG

@react-hookz/web

Version:

React hooks done right, for browser and SSR.

7 lines (6 loc) 227 B
export function resolveHookState(nextState, prevState) { // eslint-disable-next-line @typescript-eslint/no-unsafe-return if (typeof nextState === 'function') return nextState(prevState); return nextState; }