Skip to content
Docs
Hooks
useDisclosure

useDisclosure

Hook to manage opened and closed states for Modal for example.

Import

import { useDisclosure } from 'react-native-ficus-ui';

Usage

const { isOpen, onOpen, onClose } = useDisclosure();

Returned elements

isOpen

Boolean indicating if element is opened or not.

onOpen

Method to set isOpen at true.

onClose

Method to set isOpen at false.