From 4fd6401479f9da6fee84bd6a351fa0a2b92e8701 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=A8=E3=81=86=E3=81=9B=E3=81=84=E3=81=8D=E3=82=87?= =?UTF-8?q?=E3=81=86?= Date: Sat, 20 May 2017 11:08:33 +0800 Subject: [PATCH] Update to smart_dumb mode --- chapter-03/redux_smart_dumb/src/views/Summary.js | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/chapter-03/redux_smart_dumb/src/views/Summary.js b/chapter-03/redux_smart_dumb/src/views/Summary.js index d653330..4203b1a 100644 --- a/chapter-03/redux_smart_dumb/src/views/Summary.js +++ b/chapter-03/redux_smart_dumb/src/views/Summary.js @@ -4,9 +4,8 @@ import store from '../Store.js'; class Summary extends Component { render() { - const sum = this.state.sum; return ( -
Total Count: {sum}
+
Total Count: {this.props.sum}
); } } @@ -54,13 +53,10 @@ class SummaryContainer extends Component { } render() { - const sum = this.state.sum; return ( -
Total Count: {sum}
+ ); } } export default SummaryContainer; - -