-
Notifications
You must be signed in to change notification settings - Fork 15
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
base: master
Are you sure you want to change the base?
HT6 #38
Conversation
There was a problem hiding this 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> |
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
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({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
каждую страницу надо было загружать только один раз, не вижу кеширования
There was a problem hiding this comment.
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()
No description provided.