'use strict';

var React = require('react');
var context = require('../context.cjs');

const useDataTable = () => {
    const ctx = React.useContext(context.TableContext);
    if (ctx === null) {
        throw new Error("useDataTable must be used inside of a DataTable.Provider");
    }
    return ctx;
};

exports.useDataTable = useDataTable;
//# sourceMappingURL=useDataTable.cjs.map
