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 --save
Documentation
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
7 years ago
0.0.12
7 years ago
0.0.11
7 years ago
0.0.9
7 years ago
0.0.8
7 years ago
0.0.7
7 years ago
0.0.6
7 years ago
0.0.5
7 years ago
0.0.4
7 years ago
0.0.3
7 years ago
0.0.2
7 years ago
0.0.1
7 years ago