Skip to content

Commit

Permalink
Create a Redux-ORM Schema and the initial entities reducer
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson committed Dec 11, 2016
1 parent 3ccddf1 commit 1e48ca2
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/app/reducers/entitiesReducer.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import {createReducer} from "common/utils/reducerUtils";

import schema from "app/schema"

const initialState = schema.getDefaultState();

export default createReducer(initialState, {
});
3 changes: 3 additions & 0 deletions src/app/reducers/rootReducer.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import {combineReducers} from "redux";

import entitiesReducer from "./entitiesReducer";
import tabReducer from "features/tabs/tabReducer";
import unitInfoReducer from "features/unitInfo/unitInfoReducer";


const rootReducer = combineReducers({
entities : entitiesReducer,
unitInfo : unitInfoReducer,
tabs : tabReducer,
});
Expand Down
1 change: 1 addition & 0 deletions src/app/schema/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export {default} from "./schema";
5 changes: 5 additions & 0 deletions src/app/schema/schema.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import {Schema} from "redux-orm";

const schema = new Schema();

export default schema;

0 comments on commit 1e48ca2

Please sign in to comment.