Skip to content

HT5.1#50

Open
mas-student wants to merge 1 commit into
romabelka:masterfrom
mas-student:HT5
Open

HT5.1#50
mas-student wants to merge 1 commit into
romabelka:masterfrom
mas-student:HT5

Conversation

@mas-student
Copy link
Copy Markdown

No description provided.

}

const mapStateToProps = state => ({
comments: state.comments.get('entities'),
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.

вот этого я совсем не понял. Все entities?

Comment thread src/components/comment.js
}

export default connect(createMapStateToProps)(Comment) No newline at end of file
export default connect(null)(Comment)
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.

зачем вообще этот коннект?

Comment thread src/reducer/comments.js

case LOAD_COMMENTS + SUCCESS:
return state
.set('entities', 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

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.

3 participants