Skip to content

Commit dc2894f

Browse files
committed
07-exporting-selectors
1 parent db8b3f8 commit dc2894f

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/app/shared/state/index.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,16 @@ export const metaReducers: MetaReducer<State>[] = [];
1414
/**
1515
* Selectors
1616
*/
17+
export const selectBooksState = (state: State) => state.books;
18+
export const selectAllBooks = createSelector(
19+
selectBooksState,
20+
fromBooks.selectAll
21+
);
22+
export const selectActiveBook = createSelector(
23+
selectBooksState,
24+
fromBooks.selectActiveBook
25+
);
26+
export const selectBooksEarningsTotals = createSelector(
27+
selectBooksState,
28+
fromBooks.selectEarningsTotals
29+
);

0 commit comments

Comments
 (0)