Skip to content

ht5 done#54

Open
musiclover174 wants to merge 1 commit into
romabelka:masterfrom
musiclover174:master
Open

ht5 done#54
musiclover174 wants to merge 1 commit into
romabelka:masterfrom
musiclover174:master

Conversation

@musiclover174
Copy link
Copy Markdown

No description provided.

Comment thread src/reducer/comments.js

const ReducerState = Record({
entities: arrToMap([], CommentRecord),
loading: false,
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

здесь не достаточно повесить loading на весь comments, ведь ты для конкрентной статьи загружаешь

Comment thread src/reducer/comments.js

case LOAD_COMMENTS + SUCCESS:
return comments
.update('entities', comments => Object.assign(comments, arrToMap(payload.response, CommentRecord)))
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.mergeIn, Object.assign совсем не подойдет

Comment thread src/reducer/comments.js
return comments
.update('entities', comments => Object.assign(comments, arrToMap(payload.response, CommentRecord)))
.set('loading', false)
.set('loaded', true)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Почему loaded === true, ведь ты загрузил только для одной статьи?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants