"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.default = usePropState;
const react_1 = require("react");
function usePropState(state, setState, initialState) {
    const [localState, setLocalState] = (0, react_1.useState)(initialState);
    return [
        state !== undefined ? state : localState,
        setState !== undefined ? setState : setLocalState,
    ];
}
