Created
March 5, 2020 20:04
-
-
Save painedpineapple/b5b2f1951c46a2e3438a332a4f8b4b93 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type resizeObserverPolyfill; | |
[@bs.module "@juggle/resize-observer"] | |
external polyfill: resizeObserverPolyfill = "ResizeObserver"; | |
type debounce = { | |
scroll: int, | |
resize: float, | |
}; | |
[@bs.deriving abstract] | |
type params = { | |
[@bs.optional] | |
polyfill: resizeObserverPolyfill, | |
[@bs.optional] | |
debounce, | |
[@bs.optional] | |
scroll: bool, | |
}; | |
[@bs.module "react"] | |
external useEffect2: | |
([@bs.uncurry] (unit => option(unit => unit)), ('a, 'b)) => unit = | |
"useEffect"; | |
type bounds = { | |
width: int, | |
height: int, | |
left: float, | |
top: float, | |
bottom: float, | |
right: float, | |
x: float, | |
y: float, | |
}; | |
[@bs.module "react-use-measure"] | |
external use: params => (ReactDOMRe.domRef, bounds) = "default"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment