source: imaps-frontend/node_modules/react-use/esm/misc/hookState.js

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 206 bytes
Line 
1export 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.