yoannfleurydev/react-use-disclosure
yoannfleurydev/react-use-disclosure has 41 GitHub stars and 3 forks. GitHot measured 0 in 7 days. Last checked 2026-11-10 23:08 UTC. Last push 2026-11-02.
⚛️ Custom React Hook to handle open/close/toggle of a state.
Measured star growth
- in 24h
- Update delayed
- in 7 days
- 0
- in 15 days
- Collecting history
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
Originalreact-use-disclosure
useDiclosure is a React custom hook to perform common open/close behavior on
modals, tooltips etc.
🔧 Installation
# Using yarn.
yarn add react-use-disclosure
# Using npm.
npm install react-use-disclosure
🔎 Usage
As useDisclosure return an object, you can get the key that you want:
// At the top of your file.
import { useDisclosure } from "react-use-disclosure";
// Then, in your component.
const {
isOpen: isModalOpen,
open: openModal,
close: closeModal,
} = useDisclosure();
const { isOpen: isTooltipOpen, toggle: toggleTooltip } = useDiclosure(true);
// For the example, but the default value is false.
const { isOpen, open, close, toggle } = useDisclosure(false);
Explore related projects
freeCodeCamp/freeCodeCamp
freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.
458,946 starsdonnemartin/system-design-primer
Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.
377,583 starsreact/react
The library for web and native user interfaces.
252,497 starsvuejs/vue
This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
212,622 stars