Quellcode durchsuchen

Step 8.2: Add getInitialState to App component.

Frederic G. MARAND vor 9 Jahren
Ursprung
Commit
cb9d84e210
1 geänderte Dateien mit 6 neuen und 0 gelöschten Zeilen
  1. 6 0
      App.jsx

+ 6 - 0
App.jsx

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