@@ -17,7 +17,7 @@ function tick() {
1717 const element = (
1818 <div>
1919 <h1>Привіт, світе!</h1>
20- <h2>Це є {new Date().toLocaleTimeString()}.</h2>
20+ <h2>Зараз {new Date().toLocaleTimeString()}.</h2>
2121 </div>
2222 );
2323 ReactDOM.render(
@@ -40,7 +40,7 @@ function Clock(props) {
4040 return (
4141 <div>
4242 <h1>Привіт, світе!</h1>
43- <h2>Це є {props.date.toLocaleTimeString()}.</h2>
43+ <h2>Зараз {props.date.toLocaleTimeString()}.</h2>
4444 </div>
4545 );
4646}
@@ -94,7 +94,7 @@ class Clock extends React.Component {
9494 return (
9595 < div>
9696 < h1> Привіт, світе! < / h1>
97- < h2> Це є {this .props .date .toLocaleTimeString ()}.< / h2>
97+ < h2> Зараз {this .props .date .toLocaleTimeString ()}.< / h2>
9898 < / div>
9999 );
100100 }
@@ -119,7 +119,7 @@ class Clock extends React.Component {
119119 return (
120120 <div>
121121 <h1>Привіт, світе!</h1>
122- <h2>Це є {this.state.date.toLocaleTimeString()}.</h2>
122+ <h2>Зараз {this.state.date.toLocaleTimeString()}.</h2>
123123 </div>
124124 );
125125 }
@@ -139,7 +139,7 @@ class Clock extends React.Component {
139139 return (
140140 <div>
141141 <h1>Привіт, світе!</h1>
142- <h2>Це є {this.state.date.toLocaleTimeString()}.</h2>
142+ <h2>Зараз {this.state.date.toLocaleTimeString()}.</h2>
143143 </div>
144144 );
145145 }
@@ -181,7 +181,7 @@ class Clock extends React.Component {
181181 return (
182182 <div>
183183 <h1>Привіт, світе!</h1>
184- <h2>Це є {this.state.date.toLocaleTimeString()}.</h2>
184+ <h2>Зараз {this.state.date.toLocaleTimeString()}.</h2>
185185 </div>
186186 );
187187 }
@@ -226,7 +226,7 @@ class Clock extends React.Component {
226226 return (
227227 <div>
228228 <h1>Привіт, світе!</h1>
229- <h2>Це є {this.state.date.toLocaleTimeString()}.</h2>
229+ <h2>Зараз {this.state.date.toLocaleTimeString()}.</h2>
230230 </div>
231231 );
232232 }
@@ -290,7 +290,7 @@ class Clock extends React.Component {
290290 return (
291291 <div>
292292 <h1>Привіт, світе!</h1>
293- <h2>Це є {this.state.date.toLocaleTimeString()}.</h2>
293+ <h2>Зараз {this.state.date.toLocaleTimeString()}.</h2>
294294 </div>
295295 );
296296 }
@@ -420,7 +420,7 @@ this.setState(function(state, props) {
420420Компонент може передати свій стан вниз у якості пропсів до своїх дочірніх компонентів:
421421
422422``` js
423- < h2> Це є {this .state .date .toLocaleTimeString ()}.< / h2>
423+ < h2> Зараз {this .state .date .toLocaleTimeString ()}.< / h2>
424424```
425425
426426Це також працює для визначених користувачем компонентів:
@@ -433,7 +433,7 @@ this.setState(function(state, props) {
433433
434434``` js
435435function FormattedDate (props ) {
436- return < h2> Це є {props .date .toLocaleTimeString ()}.< / h2> ;
436+ return < h2> Зараз {props .date .toLocaleTimeString ()}.< / h2> ;
437437}
438438```
439439
0 commit comments