mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
12 lines
332 B
TypeScript
12 lines
332 B
TypeScript
import * as React from "react";
|
|
import { render } from "react-dom";
|
|
|
|
import { useClickOutside } from "react-click-outside-hook";
|
|
|
|
function Component() {
|
|
const [ref, hasClickedOutside] = useClickOutside();
|
|
return <div ref={ref}>{hasClickedOutside.toString()}</div>;
|
|
}
|
|
|
|
render(<Component />, document.getElementById("test"));
|