File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -134,17 +134,16 @@ MyComponent.propTypes = {
134
134
};
135
135
```
136
136
137
- ### Ограничение на один дочерний компонент {#requiring-single-child}
137
+ ### Требование одного дочернего элемента {#requiring-single-child}
138
138
139
- С помощью ` PropTypes.element ` вы можете указать, что в качестве дочернего может быть передан только один элемент .
139
+ С помощью ` PropTypes.element ` вы можете указать, что только один дочерний элемент может быть передан компоненту в качестве потомка .
140
140
141
141
``` javascript
142
142
import PropTypes from ' prop-types' ;
143
143
144
144
class MyComponent extends React .Component {
145
145
render () {
146
- // Это должен быть ровно один элемент.
147
- // Иначе вы увидите предупреждение
146
+ // Это должен быть ровно один элемент, иначе вы увидите предупреждение.
148
147
const children = this .props .children ;
149
148
return (
150
149
< div>
You can’t perform that action at this time.
0 commit comments