import * as React from "react";
export const useOnWindowResize = (handler) => {
    React.useEffect(() => {
        const handleResize = () => {
            handler();
        };
        handleResize();
        window.addEventListener("resize", handleResize);
        return () => {
            window.removeEventListener("resize", handleResize);
        };
    }, [handler]);
};
//# sourceMappingURL=UseWindowOnResize.js.map