-
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
ДЗ5 #68
base: master
Are you sure you want to change the base?
ДЗ5 #68
Conversation
loading: false, | ||
loaded: false, | ||
error: null, | ||
visited: [], |
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.
лучше объектом это хранить, удобнее проверка будет
averageRating: averageRatingSelector(state, props), | ||
reviewsLoading: reviewsLoadingSelector(state), | ||
reviewsLoaded: reviewsLoadedSelector(state), | ||
visited: hasRestaurantReviewsVisited(state, { |
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.
лучше так не делать, чтобы потом при изменении переписать только селектор и не трогать connect, то есть писать так - hasRestaurantReviewsVisited(state, props)
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
, чтобы в селектор попал именно restaurantId
? А то у меня в разных компонентах этот проп по разному называется, а селектор хочется один и тот же использовать
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.