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

HT7 #54

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

HT7 #54

wants to merge 9 commits into from

Conversation

mettta
Copy link

@mettta mettta commented Jan 21, 2021

No description provided.


const mapStateToProps = state => ({
sending: orderSendingSelector(state),
pathname: state.router.location.pathname,
Copy link
Owner

Choose a reason for hiding this comment

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

используйте селекторы, в т.ч. в connected-react-router есть свои селекторы, которые можно так же использовать

<CSSTransition
key={id}
timeout={500}
classNames={{ ...styles }}
Copy link
Owner

Choose a reason for hiding this comment

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

сюда лучше не передавать лишние стили, которые не касаются анимации (либо отдельный файл сделать, либо из объекта стилей отобрать нужное)


return <Route path="/restaurants/:restId" component={Restaurants} />;
return (
<Switch>
Copy link
Owner

Choose a reason for hiding this comment

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

отличное решение, у меня не так красиво :(

'/api/order',
{
method: 'POST',
headers: {
Copy link
Owner

Choose a reason for hiding this comment

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

вот эти все низкоуровневые штуки лучше делать в middleware/api.js, на занятие расскажу почему

@koretskiyav
Copy link
Owner

отличная работа!

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