Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

Commit

Permalink
feat(selectors): create /selectors with selectors for states
Browse files Browse the repository at this point in the history
feat(selectors): create /selectors with selectors for states
  • Loading branch information
Metnew committed Sep 4, 2017
1 parent e1527e3 commit f9b4c5c
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/common/selectors/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// @flow
import type {State as AuthState} from 'reducers/auth'
import type {State as LayoutState} from 'reducers/layout'
import type {State as EntitiesPostsState} from 'reducers/posts'
import type {State as EntitiesUsersState} from 'reducers/users'
import type {GlobalState} from 'reducers'

export const getAuthState = (state: GlobalState): AuthState => state.me.auth
export const getLayoutState = (state: GlobalState): LayoutState => state.layout
export const getEntitiesPostsState = (state: GlobalState): EntitiesPostsState => state.entities.posts
export const getEntitiesUsersState = (state: GlobalState): EntitiesUsersState => state.entities.users

0 comments on commit f9b4c5c

Please sign in to comment.