HooksuseToggleUsage Easy to use, no configuration required. app/page.tsximport { useToggle } from "@pyr33x/hooks"; export const App = () => { const { current, handleToggle } = useToggle(false); return ( <div> <p>Current value: {current ? "True" : "False"}</p> <button onClick={handleToggle}>Toggle value</button> </div> ); }; Hook You can copy & paste the hook below and make it ready to use. useClient.tsimport { useState } from "react"; export const useToggle = (initialValue: boolean) => { const [current, setCurrent] = useState(initialValue); const handleToggle = () => setCurrent((prev) => !prev); return { current, handleToggle }; };PrevioususeStorageNextuseWindow