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
|
Line | |
---|
1 | import { useEffect } from 'react';
|
---|
2 | var 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 | };
|
---|
14 | export default useLifecycles;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.