Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

ДЗ4 #63

wants to merge 1 commit into from

Conversation

chrstnv
Copy link

@chrstnv chrstnv commented Nov 30, 2020

No description provided.

export const createReview = (values, meta) => ({
type: CREATE_REVIEW,
payload: { ...values },
meta,
Copy link
Owner

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) {
Copy link
Owner

Choose a reason for hiding this comment

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

нету добавления пользователя по CREATE_REVIEW

Copy link
Author

Choose a reason for hiding this comment

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

а я сначала сделала, и id ему в мидлваре генерила, а потом все это выпилила, у нас же нет текущего пользователя, поэтому мне показалось более правильным оставить анонимуса :) значит, неправильно показалось

Copy link
Owner

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),
Copy link
Owner

Choose a reason for hiding this comment

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

тут лучше не делать каррирования, а сделать review: reviewSelecor(state, props) На занятии расскажу почему

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