![]() It receives a task as a parameter which is an object that we get from the list of tasks that is received as a response from the request made to the API. ![]() displayTask: This method, as its name already says it all, is just displaying a particular task which in practical terms means that it actually just adds a item to the Task List.If we don’t need the state in some method, there is no need to bind the this instance to it. constructor: Calls the super(props) which refers to the parent class constructor and its properties and also, here we bind the this instance to the methods that use the state of the TaskList component, so we can access it in them.Just to be clearer as for what each method is doing: It’s consisted of a constructor, three methods and the default render method. ![]() Our TaskList component is actually an unordered list.
0 Comments
Leave a Reply. |