source: imaps-frontend/node_modules/react-use/esm/useUpdateEffect.js@ d565449

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

Update repo after prototype presentation

  • Property mode set to 100644
File size: 332 bytes
RevLine 
[d565449]1import { useEffect } from 'react';
2import { useFirstMountState } from './useFirstMountState';
3var useUpdateEffect = function (effect, deps) {
4 var isFirstMount = useFirstMountState();
5 useEffect(function () {
6 if (!isFirstMount) {
7 return effect();
8 }
9 }, deps);
10};
11export default useUpdateEffect;
Note: See TracBrowser for help on using the repository browser.