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:
333 bytes
|
Rev | Line | |
---|
[d565449] | 1 | import { useMemo } from 'react';
|
---|
| 2 | var createMemo = function (fn) {
|
---|
| 3 | return function () {
|
---|
| 4 | var args = [];
|
---|
| 5 | for (var _i = 0; _i < arguments.length; _i++) {
|
---|
| 6 | args[_i] = arguments[_i];
|
---|
| 7 | }
|
---|
| 8 | return useMemo(function () { return fn.apply(void 0, args); }, args);
|
---|
| 9 | };
|
---|
| 10 | };
|
---|
| 11 | export default createMemo;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.