@@ -68,34 +68,19 @@ function Welcome(props) {
68
68
return <h1>नमस्ते, {props.name}</h1>;
69
69
}
70
70
71
- <<<<<<< HEAD
72
71
const element = <Welcome name="नेहा" />;
73
- ReactDOM.render(
74
- element,
75
- document.getElementById('root')
76
- );
77
- =======
78
- const element = <Welcome name="Sara" />;
79
72
const root = ReactDOM.createRoot(document.getElementById('root'));
80
73
root.render(element);
81
- >>>>>>> 707f22d25f5b343a2e5e063877f1fc97cb1f48a1
82
74
```
83
75
84
76
** [ Try it on CodePen] ( https://codepen.io/gaearon/pen/YGYmEG?editors=1010 ) **
85
77
86
78
चलिए देख़ते है इस उदाहरण में क्या होता है:
87
79
88
- <<<<<<< HEAD
89
- 1 . हम ` <Welcome name="नेहा" /> ` के द्वारा ` ReactDOM.render() ` को call karte है|
90
- 2 . React ` Welcome ` कौम्पोनॅन्ट को ` name: 'नेहा'} ` के साथ props के रूप मे call करती है|
91
- 3 . हमारा ` Welcome ` कौम्पोनॅन्ट परिणाम के तौर पर ` <h1>नमस्ते, नेहा</h1> ` एलिमेंट वापस लौटाता करता है|
92
- 4 . React DOM कुशलता पूर्वक DOM को ` <h1>नमस्ते, नेहा</h1> ` से अपडेट करता है|
93
- =======
94
- 1 . We call ` root.render() ` with the ` <Welcome name="Sara" /> ` element.
95
- 2 . React calls the ` Welcome ` component with ` {name: 'Sara'} ` as the props.
96
- 3 . Our ` Welcome ` component returns a ` <h1>Hello, Sara</h1> ` element as the result.
97
- 4 . React DOM efficiently updates the DOM to match ` <h1>Hello, Sara</h1> ` .
98
- >>>>>>> 707f22d25f5b343a2e5e063877f1fc97cb1f48a1
80
+ 1 . हम ` <Welcome name="नेहा" /> ` एलिमेंट के साथ ` root.render() ` को कॉल करते है।
81
+ 2 . React ` Welcome ` कौम्पोनॅन्ट को ` {name: 'नेहा'} ` के साथ props के रूप मे कॉल करता है।
82
+ 3 . हमारा ` Welcome ` कौम्पोनॅन्ट परिणाम के तौर पर ` <h1>नमस्ते, नेहा</h1> ` एलिमेंट वापस लौटाता है।
83
+ 4 . React DOM कुशलता पूर्वक DOM को ` <h1>नमस्ते, नेहा</h1> ` से अपडेट करता है।
99
84
100
85
> ** ध्यान दें:** कौम्पोनॅन्टस के नाम की शुरुवात हमेशा कैपिटल लेटर से होनी चाहिए|
101
86
>
0 commit comments