ソースを参照

Step 9.8: Update Task component to show username.

Frederic G. MARAND 8 年 前
コミット
cefd2c6b19
1 ファイル変更7 行追加2 行削除
  1. 7 2
      Task.jsx

+ 7 - 2
Task.jsx

@@ -29,9 +29,14 @@ Task = React.createClass({
           ×
           ×
           </button>
           </button>
 
 
-        <input type="checkbox" readOnly="{true}" checked={this.props.task.checked} onClick={this.toggleChecked} />
+        <input
+          type="checkbox"
+          readOnly="{true}"
+          checked={this.props.task.checked}
+          onClick={this.toggleChecked}
+        />
 
 
-        <span className="text">{this.props.task.text}</span>
+        <strong>{this.props.task.username}</strong>: <span className="text">{this.props.task.text}</span>
       </li>
       </li>
     );
     );
     return result;
     return result;