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

質問編集履歴

2

一部削除

2018/03/25 03:44

投稿

dwayne_johnson
dwayne_johnson

スコア86

title CHANGED
File without changes
body CHANGED
@@ -58,6 +58,4 @@
58
58
  よろしくお願いします。
59
59
 
60
60
  <<追記>>
61
- In an ideal world, most of your components would be stateless functions because in the future we’ll also be able to make performance optimizations specific to these components by avoiding unnecessary checks and memory allocations. This is the recommended pattern, when possible.
62
- だそうで。
63
- できる限りfunctionを使っていき、state管理など必要がある場合にのみclassにする
61
+ In an ideal world, most of your components would be stateless functions because in the future we’ll also be able to make performance optimizations specific to these components by avoiding unnecessary checks and memory allocations. This is the recommended pattern, when possible.

1

追記

2018/03/25 03:44

投稿

dwayne_johnson
dwayne_johnson

スコア86

title CHANGED
File without changes
body CHANGED
@@ -55,4 +55,9 @@
55
55
  このように、functionで定義した場合は`const listItems`が関数内に入っているのですが、classで定義する場合にはclass内に入れることができず、何となくもどかしいというか。
56
56
 
57
57
  componentの種類などによりこの2つを使い分けたほうがいいのか、どちらかに統一してしまったほうがいいのか、使い分けの方法を教えてほしいです。
58
- よろしくお願いします。
58
+ よろしくお願いします。
59
+
60
+ <<追記>>
61
+ In an ideal world, most of your components would be stateless functions because in the future we’ll also be able to make performance optimizations specific to these components by avoiding unnecessary checks and memory allocations. This is the recommended pattern, when possible.
62
+ だそうで。
63
+ できる限りfunctionを使っていき、state管理など必要がある場合にのみclassにする