Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Apr 3, 2022. It is now read-only.

Commit298a86f

Browse files
committed
Add props to SomeComponent
1 parent2b1d90c commit298a86f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎src/App.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function About() {
5757
return(
5858
<>
5959
<h2>About</h2>
60-
<SomeComponent/>
60+
<SomeComponenttext="about"/>
6161
</>
6262
);
6363
}
@@ -66,7 +66,7 @@ function Users() {
6666
return(
6767
<>
6868
<h2>Users</h2>
69-
<SomeComponent/>
69+
<SomeComponenttext="users"/>
7070
</>
7171
);
7272
}

‎src/SomeComponent.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
functionSomeComponent(){
1+
functionSomeComponent({ text}){
22
return(
3-
<pstyle={{fontSize:20,color:'#61dafb'}}>This isexample component</p>
3+
<pstyle={{fontSize:20,color:'#61dafb'}}>This is{text} component</p>
44
)
55
}
66

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp