Skip to content

HT6 #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

HT6 #38

wants to merge 3 commits into from

Conversation

Ozerich
Copy link

@Ozerich Ozerich commented Mar 10, 2019

No description provided.

Copy link
Owner

@romabelka romabelka left a comment

Choose a reason for hiding this comment

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

Jr^ yj rjvvty


return items.map((model) => {
return (
<p>
Copy link
Owner

Choose a reason for hiding this comment

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

key не забывай

return state
.setIn(
['entities', action.payload.page],
action.response.records.map((item) => new CommentRecord(item))
Copy link
Owner

Choose a reason for hiding this comment

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

я бы хранил комменты в comments.entities, по сути это те же сущности

export function loadComments(page) {
page = +page
return async (dispatch) => {
dispatch({
Copy link
Owner

Choose a reason for hiding this comment

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

каждую страницу надо было загружать только один раз, не вижу кеширования

Copy link
Author

Choose a reason for hiding this comment

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

https://github.com/romabelka/basic-react-1102/blob/master/src/ac/index.js#L66

Здесь тоже нет кеширования.

Кеширование у нас ведь делается на уровне connect()

https://github.com/Ozerich/basic-react-1102/blob/a6e65d2148d7aba2ddbe095f6256e4597810575e/src/components/comments-page-list.js#L26

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