source:
imaps-frontend/node_modules/react-use/esm/misc/hookState.js
Last change on this file was d565449, checked in by , 4 weeks ago | |
---|---|
|
|
File size: 206 bytes |
Rev | Line | |
---|---|---|
[d565449] | 1 | export function resolveHookState(nextState, currentState) { |
2 | if (typeof nextState === 'function') { | |
3 | return nextState.length ? nextState(currentState) : nextState(); | |
4 | } | |
5 | return nextState; | |
6 | } |
Note:
See TracBrowser
for help on using the repository browser.