Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
26 lines
718 B
JavaScript
26 lines
718 B
JavaScript
// Module ID: 6806
|
|
// Function ID: 6807
|
|
// Dependencies: [19, 6791]
|
|
// Exports: useViewRefHandler
|
|
|
|
// Module 6806
|
|
import _mod19 from "module_19" /* 19 */;
|
|
import _modDef6791 from "module_6791" /* 6791 */;
|
|
|
|
_mod19.useCallback;
|
|
|
|
export const useViewRefHandler = function useViewRefHandler(current, detectorUpdater) {
|
|
const previousViewTag = current;
|
|
const items = [current, detectorUpdater];
|
|
return useCallback((viewRef) => {
|
|
if (null !== viewRef) {
|
|
previousViewTag.viewRef = viewRef;
|
|
if (-1 === previousViewTag.previousViewTag) {
|
|
tmp.previousViewTag = _modDef6791(tmp.viewRef);
|
|
}
|
|
if (!previousViewTag.firstRender) {
|
|
detectorUpdater(true);
|
|
}
|
|
}
|
|
}, items);
|
|
};
|