taos
Version:
TAOS - Tailwind CSS Animation on Scroll Library
19 lines (13 loc) • 322 B
JavaScript
import React, { useEffect, useRef } from "react";
import { initElement, removeElement } from "./utils";
const useTaos = () => {
const ref = useRef(null);
useEffect(() => {
initElement(ref.current);
return () => {
removeElement(ref.current);
};
}, []);
return ref;
};
export default useTaos;