-
Notifications
You must be signed in to change notification settings - Fork 16
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
HW7 Navruzov #86
base: master
Are you sure you want to change the base?
HW7 Navruzov #86
Conversation
import { useState } from 'react'; | ||
|
||
const App = () => { | ||
const [name, setName] = useState('Andrey'); | ||
const [currency, setCurrency] = useState('USD'); |
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.
Я говорил о том, что не стоит всю логику и данные контекста хранить в состоянии нашего приложения. Покажу как это можно сделать удобнее на своей домашке.
@@ -25,7 +26,12 @@ function BasketItem({ | |||
<span className={styles.count}>{amount}</span> | |||
<Button onClick={increment} icon="plus" secondary small /> | |||
</div> | |||
<p className={cn(styles.count, styles.price)}>{subtotal} $</p> | |||
<p className={cn(styles.count, styles.price)}> | |||
<CurrencyConsumer> |
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 <Loader />; | ||
} | ||
if (fetchValue === 'ok') { | ||
ordersSelector = {}; |
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.
не совсем понимаю что это? в селектор что-то присваивать?
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.
Обнуляю basket
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.
это так не работает, все изменения в редаксе происходят через диспатч екшенов
@@ -5,6 +5,8 @@ import Review from './review'; | |||
import Loader from '../loader'; | |||
import ReviewForm from './review-form'; | |||
import styles from './reviews.module.css'; | |||
import { CSSTransition, TransitionGroup } from 'react-transition-group'; | |||
import './reviews.css'; |
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.
необходимо было сделать вариант через css modules
No description provided.