You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
264 B
10 lines
264 B
5 months ago
|
import * as React from "rehackt";
|
||
|
var INIT = {};
|
||
|
export function useLazyRef(getInitialValue) {
|
||
|
var ref = React.useRef(INIT);
|
||
|
if (ref.current === INIT) {
|
||
|
ref.current = getInitialValue();
|
||
|
}
|
||
|
return ref;
|
||
|
}
|
||
|
//# sourceMappingURL=useLazyRef.js.map
|