source: imaps-frontend/node_modules/react-use/esm/useLifecycles.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: 316 bytes
RevLine 
[d565449]1import { useEffect } from 'react';
2var useLifecycles = function (mount, unmount) {
3 useEffect(function () {
4 if (mount) {
5 mount();
6 }
7 return function () {
8 if (unmount) {
9 unmount();
10 }
11 };
12 }, []);
13};
14export default useLifecycles;
Note: See TracBrowser for help on using the repository browser.