pricing4react
Version:
A library of components that ease the integration of feature toggling driven by pricing plans into your React application's UI.
18 lines (17 loc) • 366 B
TypeScript
export interface TableState<T> {
index: number;
data: Array<T>;
}
export type Action<T> = {
type: "add_item";
payload: T;
} | {
type: "update_item";
payload: T;
} | {
type: "delete_item";
} | {
type: "select_item";
index: number;
};
export declare function tableReducer<T>(state: TableState<T>, action: Action<T>): TableState<T>;