[Enhancement] Apply immutable js. (#49)

This commit is contained in:
Qolzam
2018-04-04 10:33:15 +07:00
parent b94d2a0124
commit 9cd2672395
98 changed files with 1294 additions and 1633 deletions

View File

@@ -1,7 +1,7 @@
const getPost = (state: any, userId: string, postId: string) => {
return (state.post.userPosts && state.post.userPosts[userId] && state.post.userPosts[userId][postId])
? state.post.userPosts[userId][postId]
: null
import {Map} from 'immutable'
const getPost = (state: Map<string, any>, userId: string, postId: string) => {
return state.getIn(['post', 'userPosts', userId, postId])
}
export const postSelector = {