Skip to content

Commit 7c776bf

Browse files
authored
Merge pull request #690 from KonstHardy/Improve-translation
Improve translation for PropTypes (requiring-single-child)
2 parents d137e09 + 5d44276 commit 7c776bf

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

content/docs/typechecking-with-proptypes.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,17 +134,16 @@ MyComponent.propTypes = {
134134
};
135135
```
136136

137-
### Ограничение на один дочерний компонент {#requiring-single-child}
137+
### Требование одного дочернего элемента {#requiring-single-child}
138138

139-
С помощью `PropTypes.element` вы можете указать, что в качестве дочернего может быть передан только один элемент.
139+
С помощью `PropTypes.element` вы можете указать, что только один дочерний элемент может быть передан компоненту в качестве потомка.
140140

141141
```javascript
142142
import PropTypes from 'prop-types';
143143

144144
class MyComponent extends React.Component {
145145
render() {
146-
// Это должен быть ровно один элемент.
147-
// Иначе вы увидите предупреждение
146+
// Это должен быть ровно один элемент, иначе вы увидите предупреждение.
148147
const children = this.props.children;
149148
return (
150149
<div>

0 commit comments

Comments
 (0)