-
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
ДЗ4 #63
base: master
Are you sure you want to change the base?
ДЗ4 #63
Conversation
export const createReview = (values, meta) => ({ | ||
type: CREATE_REVIEW, | ||
payload: { ...values }, | ||
meta, |
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.
ну это не совсем meta, restaurantId скорее в payload должен идти
const reducer = (users = defaultUsers, action) => { | ||
const { type } = action; | ||
|
||
switch (type) { |
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.
нету добавления пользователя по CREATE_REVIEW
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.
пользователь специально пишет свое имя, чтобы его запомнили :)
const getReviewUser = makeGetReviewUser(id); | ||
|
||
return (state) => ({ | ||
review: getReview(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.
тут лучше не делать каррирования, а сделать review: reviewSelecor(state, props)
На занятии расскажу почему
No description provided.