Skip to content

Ht7.2 #41

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

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

Ht7.2 #41

wants to merge 2 commits into from

Conversation

Ozerich
Copy link

@Ozerich Ozerich commented Mar 13, 2019

No description provided.

Vital Ozierski added 2 commits March 13, 2019 22:37

class UserForm extends Component {
render() {
const { value } = this.props
return (
<div>
Username: <input value={value} onChange={this.handleChange} />
<LanguageConsumer>
{(language, dict) => <span>{language === 'EN' ? 'Username' : 'Пользователь'}</span>}
Copy link
Owner

Choose a reason for hiding this comment

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

Лучше бы сделать кастомный компонент, и спрятать туда работу со словарем, если захочешь добавить третий язык - будешь все приложение переписывать

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