-
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
Lesson7 #91
base: master
Are you sure you want to change the base?
Lesson7 #91
Conversation
|
||
const App = () => { | ||
const [name, setName] = useState('Andrey'); | ||
const [current, setCurrent] = useState('dollar'); |
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 ( | ||
<header className={styles.header} onClick={() => setName('Igor')}> | ||
<div className={styles.tabs}> |
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.
лучше это вынести в отдельный компонент
</div> | ||
<div> | ||
<div className={styles.counter}> | ||
<div className={styles.count} data-id="product-amount"> | ||
{amount} | ||
<Money value={amount} /> |
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.
это количество в штуках, а не в валюте :)
import { connect } from 'react-redux'; | ||
import PropTypes from 'prop-types'; | ||
import Review from './review'; | ||
import Loader from '../loader'; | ||
import ReviewForm from './review-form'; | ||
import styles from './reviews.module.css'; | ||
import './review.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
Второе задание сделано очень коряво и совсем не так, как нужно, нормально не получилось :( Но хотя бы работает
.