"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useIncrement = void 0;
const react_1 = require("react");
function useIncrement(initialValue) {
    const [value, setValue] = (0, react_1.useState)(initialValue);
    const increment = (0, react_1.useCallback)((step = 1) => {
        setValue(value => value + step);
    }, []);
    const reset = (0, react_1.useCallback)(() => {
        setValue(initialValue);
    }, []);
    return [value, increment, reset];
}
exports.useIncrement = useIncrement;
//# sourceMappingURL=use-increment.js.map