@aleleba/create-react-ssr
Version:
Starter Kit of server side render of react
21 lines (17 loc) • 328 B
text/typescript
import { TTest } from '@actions';
const initialState = {
hello: 'world'
};
const testReducer = (state = initialState, action: TTest) => {
switch (action.type){
case 'CHANGE_HELLO': {
const newHello = action.payload.hello;
return {
hello: newHello
};
}
default:
return state;
}
};
export default testReducer;