19 lines
542 B
JavaScript
19 lines
542 B
JavaScript
// Metro module 1753 (f1754).
|
|
import { useRef } from "react";
|
|
import { WorkletEventHandler } from "./WorkletEventHandlerNative";
|
|
export function useEvent(a0, r6 = [], r5 = false) {
|
|
const ref = useRef(null);
|
|
if (ref.current === null) {
|
|
ref.current = {
|
|
workletEventHandler: new WorkletEventHandler(a0, r6)
|
|
};
|
|
} else if (r5) {
|
|
const workletEventHandler = ref.current.workletEventHandler;
|
|
workletEventHandler.updateEventHandler(a0, r6);
|
|
ref.current = {
|
|
workletEventHandler
|
|
};
|
|
}
|
|
return ref.current;
|
|
}
|