X_AE_A-12

generateTaskArray()

May 10th, 2020
260
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   generateTaskArray() {
  2.     var tasks = this.getTasks().tasks;
  3.     var taskArray = []
  4.     for (var i = 0; i < tasks.length; i++) {
  5.       taskArray.push(<Task value={tasks[i]} key={i} />);
  6.     }
  7.  
  8.     this.setState({ taskArray: taskArray });
  9.   }
RAW Paste Data