aboutsummaryrefslogtreecommitdiff
path: root/src/utils/react.ts
diff options
context:
space:
mode:
authorVendicated <vendicated@riseup.net>2022-12-20 00:33:52 +0100
committerVendicated <vendicated@riseup.net>2022-12-20 00:34:26 +0100
commit94ad8e8f61abb3c6256f9caa39878150b326790f (patch)
tree8cda13f72b1778ab667bf8761fee981a7673dcbd /src/utils/react.ts
parent989bd36eeb6dd6c4b391900765847cdcf87484d9 (diff)
downloadVencord-94ad8e8f61abb3c6256f9caa39878150b326790f.tar.gz
Vencord-94ad8e8f61abb3c6256f9caa39878150b326790f.tar.bz2
Vencord-94ad8e8f61abb3c6256f9caa39878150b326790f.zip
Add useEffect/useState/useMemo to webpack commons
Diffstat (limited to 'src/utils/react.ts')
-rw-r--r--src/utils/react.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/react.ts b/src/utils/react.ts
index 8585846..e5e1f67 100644
--- a/src/utils/react.ts
+++ b/src/utils/react.ts
@@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
-import { React } from "@webpack/common";
+import { React, useState } from "@webpack/common";
import { checkIntersecting } from "./misc";
@@ -30,7 +30,7 @@ export const useIntersection = (intersectOnly = false): [
isIntersecting: boolean,
] => {
const observerRef = React.useRef<IntersectionObserver | null>(null);
- const [isIntersecting, setIntersecting] = React.useState(false);
+ const [isIntersecting, setIntersecting] = useState(false);
const refCallback = (element: Element | null) => {
observerRef.current?.disconnect();