소스 검색

Step 8.2: Add getInitialState to App component.

Frederic G. MARAND 9 년 전
부모
커밋
cb9d84e210
1개의 변경된 파일6개의 추가작업 그리고 0개의 파일을 삭제
  1. 6 0
      App.jsx

+ 6 - 0
App.jsx

@@ -5,6 +5,12 @@ App = React.createClass({
   // This mixin makes the getMeteorData work.
   mixins: [ReactMeteorData],
 
+  getInitialState() {
+    return {
+      hideCompleted: false
+    };
+  },
+
   // Loads items from the Tasks collection and puts them on this.data.tasks.
   getMeteorData() {
     let result = {