useHidden

UseHiddenExample

src/prod/booleans/useHidden.ts

import React from 'react';



export const useHidden = (intialState = false) => {
	const [hidden, setHidden] = React.useState(intialState);
	const toggleHidden = () => setHidden((x: boolean) => !x);
	return [hidden, toggleHidden];
};

dist/prod/booleans/useHidden.js

import React from 'react';
export const useHidden = (intialState = false) => {
    const [hidden, setHidden] = React.useState(intialState);
    const toggleHidden = () => setHidden((x) => !x);
    return [hidden, toggleHidden];
};

src/prod/booleans/useHidden.ts

import React from 'react';



export const useHidden = (intialState = false) => {
	const [hidden, setHidden] = React.useState(intialState);
	const toggleHidden = () => setHidden((x: boolean) => !x);
	return [hidden, toggleHidden];
};