Skip to content

Commit

Permalink
docs: remove array in createReducer function
Browse files Browse the repository at this point in the history
  • Loading branch information
John Crowson authored Apr 27, 2019
1 parent cf56e40 commit 9b66485
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,8 @@ export const initialState: State = {

export const reducer = createReducer<State>(
initialState,
[
on(AuthActions.login, (): State => ({ loggedIn: true })),
on(AuthActions.logout, (): State => ({ loggedIn: false }))
]
on(AuthActions.login, (): State => ({ loggedIn: true })),
on(AuthActions.logout, (): State => ({ loggedIn: false }))
);

export const getLoggedIn = (state: State) => state.loggedIn;

0 comments on commit 9b66485

Please sign in to comment.