We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b431129 commit 12371a3Copy full SHA for 12371a3
App2.jsx
@@ -0,0 +1,42 @@
1
+/**
2
+ * In this we will discuss the concepts of ReactJS Components
3
+ */
4
+
5
+import React from 'react';
6
7
8
+ * Stateless example
9
+ * App is owner of Header and Content
10
+ * Creating Header and Content separately and adding them inside JSX tree in App component
11
+ * Only App component needs to be exported
12
13
+class App2 extends React.Component {
14
+ render() {
15
+ return (
16
+ <div>
17
+ <Header />
18
+ <Content />
19
+ </div>
20
+ );
21
+ }
22
+}
23
+class Header extends React.Component {
24
25
26
27
+ <h1>Header</h1>
28
29
30
31
32
+class Content extends React.Component {
33
34
35
36
+ <h2>Content</h2>
37
+ <p>The content text!!!</p>
38
39
40
41
42
+export default App2;
0 commit comments