X_AE_A-12

methods

May 8th, 2020
56
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. export default class App extends React.Component {
  2.   constructor(props)
  3.   {
  4.     super(props);
  5.     this.state = {
  6.       taskArray: [],
  7.       input: ""
  8.     }
  9.  
  10.     this.buttonClick = this.buttonClick.bind(this);
  11.     this.inputTyped=this.inputTyped.bind(this);
  12.     this.generateTaskArray=this.generateTaskArray.bind(this);
  13.     this.saveTasks=this.saveTasks.bind(this);
  14.     this.getTasks=this.getTasks.bind(this);
  15.     this.removeTask=this.removeTask.bind(this);
  16.   }
  17.  
  18.   render() {
  19.     return (
  20.       <div>
  21.         {this.state.taskArray}
  22.         <input type="text" /><button>Add</button>
  23.       </div>
  24.     )
  25.   }
  26.  
  27.   buttonClick()
  28.   {
  29.  
  30.   }
  31.  
  32.   inputTyped(evt)
  33.   {
  34.  
  35.   }
  36.  
  37.   generateTaskArray()
  38.   {
  39.  
  40.   }
  41.  
  42.   saveTasks(tasks)
  43.   {
  44.  
  45.   }
  46.  
  47.   getTasks()
  48.   {
  49.  
  50.   }
  51.  
  52.   removeTask(id)
  53.   {
  54.  
  55.   }
  56. }
RAW Paste Data