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

質問編集履歴

1

2017/10/08 05:04

投稿

退会済みユーザー
title CHANGED
File without changes
body CHANGED
@@ -11,4 +11,9 @@
11
11
  >
12
12
  > Your dumb components should be pure; that is, they should produce the same output given the same input, and have no external dependencies. If you pass such a component an Immutable.JS object as a prop, you make it dependent upon Immutable.JS to extract the prop’s value and otherwise manipulate it.
13
13
  >
14
- > Such a dependency renders the component impure, makes testing the component more difficult, and makes reusing and refactoring the component unnecessarily difficult.
14
+ > Such a dependency renders the component impure, makes testing the component more difficult, and makes reusing and refactoring the component unnecessarily difficult.
15
+
16
+ ---
17
+ > Such a dependency renders the component impure, makes testing the component more difficult,
18
+
19
+ テストがしづらくなるというのはモックのインスタンス作らないといけなくなったりしてわかりますが、外部への依存性がコンポーネントをimpureにするってのは何故なのでしょう?