diff --git a/.flowconfig b/.flowconfig
index 1fed445..c8ac401 100644
--- a/.flowconfig
+++ b/.flowconfig
@@ -1,4 +1,5 @@
[ignore]
+dist/
[include]
diff --git a/.modern.js.flow b/.modern.js.flow
new file mode 100644
index 0000000..5fd0da1
--- /dev/null
+++ b/.modern.js.flow
@@ -0,0 +1,23 @@
+// @flow
+import * as React from 'react';
+import ResizeListener from './ResizeListener';
+
+const defaultReporter = (target: ?HTMLElement) => ({
+ width: target != null ? target.offsetWidth : null,
+ height: target != null ? target.offsetHeight : null,
+});
+
+export default function useResizeAware(
+ reporter: typeof defaultReporter = defaultReporter
+) {
+ const [sizes, setSizes] = React.useState(reporter(null));
+ const onResize = React.useCallback(ref => setSizes(reporter(ref.current)), [
+ reporter,
+ ]);
+ const resizeListenerNode = React.useMemo(
+ () =>