0.0.24 • Published 6 years ago
@state-sync/repatch v0.0.24
@state-sync/repatch
WARNING: It is in development and I would not suggest to use it until version 1.0.
Installation
Library is available as and NPM package. You can install it as usual.
npm install @state-sync/repatch --saveDocumentation
TSDocs: documentation
Sample
// define state interface
export interface DashboardState {
progress?: boolean;
name: string;
}
// define initial state
export function initialDashboardState(): DashboardState {
return {
name: ''
};
}// State
export interface State {
dashboard: DashboardState;
}
export const initialState: State = {
dashboard: initialDashboardState()
};
let reducers = PatchReducer(initialState, combineReducers({
}));
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
export let store = createStore(reducers, composeEnhancers(applyMiddleware()));// crete patch area
const area = new PatchArea(AppRuntimeStateName, store);
// manipulate area
area.toggle('/progress');
area.replace('/name', 'My Name');0.0.23
6 years ago
0.0.24
6 years ago
0.0.22
6 years ago
0.0.21
6 years ago
0.0.20
6 years ago
0.0.19
6 years ago
0.0.17
6 years ago
0.0.16
6 years ago
0.0.15
7 years ago
0.0.14
7 years ago
0.0.13
8 years ago
0.0.12
8 years ago
0.0.11
8 years ago
0.0.9
8 years ago
0.0.8
8 years ago
0.0.7
8 years ago
0.0.6
8 years ago
0.0.5
8 years ago
0.0.4
8 years ago
0.0.3
8 years ago
0.0.2
8 years ago
0.0.1
8 years ago