UseVisibilityExample
src/prod/booleans/useVisibility.ts
import React from 'react'; export const useVisibility = (intialState = false) => { const [v, setV] = React.useState(intialState); const toggleV = () => setV((x: boolean) => !x); return [v, toggleV]; };
dist/prod/booleans/useVisibility.js
import React from 'react'; export const useVisibility = (intialState = false) => { const [v, setV] = React.useState(intialState); const toggleV = () => setV((x) => !x); return [v, toggleV]; };
src/prod/booleans/useVisibility.ts
import React from 'react'; export const useVisibility = (intialState = false) => { const [v, setV] = React.useState(intialState); const toggleV = () => setV((x: boolean) => !x); return [v, toggleV]; };