-
Notifications
You must be signed in to change notification settings - Fork 20
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
HT5 #70
base: master
Are you sure you want to change the base?
HT5 #70
Conversation
loading: false, | ||
loadedEntities: { | ||
...state.loadedEntities, | ||
[restaurantId]: arrToMap(response), |
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.
такое решение может не работать, если прийдет ответ с 0 продуктов, нужны флаги вроде loaded: true/false
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.
да точно упустил этот момент
return { | ||
...state, | ||
loading: false, | ||
loadedEntities: { |
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.
в такой структуре нужно restaurantId и reviewId чтобы получить доступ к ревью, что менее удобно, чем просто брать по reviewId
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.
но ведь в таком случае, мы не сможем грузить только ревью данного ресторана если не знаем его id
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.
да, я покажу на своей как лучше :)
No description provided.