"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useToggle = void 0;
const react_1 = require("react");
function useToggle(initialState = false) {
    const [state, setState] = (0, react_1.useState)(initialState);
    const toggle = () => setState(state => !state);
    return [state, toggle];
}
exports.useToggle = useToggle;
//# sourceMappingURL=use-toggle.js.map