mirror of
https://github.com/grafana/grafana.git
synced 2025-02-13 00:55:47 -06:00
* Feature: Adds connectWithCleanup HOC * Refactor: Small typings * Refactor: Makes UseEffect run on Mount and UnMount only * Refactor: Adds tests and rootReducer * Refactor: Fixes adding of reducers on startup
11 lines
344 B
TypeScript
11 lines
344 B
TypeScript
import { StoreState } from '../../types';
|
|
import { actionCreatorFactory } from '../redux';
|
|
|
|
export type StateSelector<T extends object> = (state: StoreState) => T;
|
|
|
|
export interface CleanUp<T extends object> {
|
|
stateSelector: StateSelector<T>;
|
|
}
|
|
|
|
export const cleanUpAction = actionCreatorFactory<CleanUp<{}>>('CORE_CLEAN_UP_STATE').create();
|