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

Lesson7 #91

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

Lesson7 #91

wants to merge 3 commits into from

Conversation

Mm5623
Copy link

@Mm5623 Mm5623 commented Nov 5, 2021

Второе задание сделано очень коряво и совсем не так, как нужно, нормально не получилось :( Но хотя бы работает
.


const App = () => {
const [name, setName] = useState('Andrey');
const [current, setCurrent] = useState('dollar');
Copy link
Owner

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}>
Copy link
Owner

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} />
Copy link
Owner

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';
Copy link
Owner

Choose a reason for hiding this comment

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

необходимо было сделать вариант через css modules

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