We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6737cea commit bad3427Copy full SHA for bad3427
app/src/reducers.js
@@ -1,12 +1,12 @@
1
-const initialState = {code: ``}
2
-const rootReducer = (state = initialState, action) => {
+const initialState = { code: '' };
+const rootReducer = (action, state = initialState) => {
3
switch (action.type) {
4
case 'CODE':
5
return { ...state, code: action.payload };
6
case 'ADD_CHILD':
7
return { ...state, child: action.payload };
8
- case 'RESET_STATE':
9
- return {...state, code: {} };
+ case 'RESET_STATE':
+ return { ...state, code: {} };
10
default:
11
return state;
12
}
0 commit comments