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; - -