teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

プログラムを簡潔に

2021/11/27 12:27

投稿

lsunrisel
lsunrisel

スコア2

title CHANGED
File without changes
body CHANGED
@@ -18,15 +18,12 @@
18
18
  props: { data }
19
19
  }
20
20
  }
21
- const test = (users: user[]) => {
22
- console.log(users) //undefinedになります。
23
- }
24
21
 
25
22
  const Home = ({ users }: Props) => {
26
23
  return (
27
24
  <>
28
25
  {users} //出力されません。
29
- <button type="button" onClick={() => test(users)}>testButton</button>
26
+ {typeof(users)} //undefined
30
27
  </>
31
28
  )
32
29
  }