Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

id on delete action javascript react

import React from 'react';

const CoursesList = ({courses, handleRemoveCourse}) => {
    return courses.map(course => {
      return (
        <div key={course.id}>
          <span>
            <a href={course.url}><h4>{course.title}</h4></a>
          </span>
          <span>by <strong>{course.author}</strong></span>
          <span>| Video Hours: {course.hours_video}</span>
          <span>| Number of Lectures: {course.number_of_lectures}</span>
          <span>| Rating: {course.rating}</span>
          <span>
            <button type="button" onClick={() => handleRemoveCourse(course)}>
              Remove
            </button>
          </span>
          <br/><br/>
        </div>
      );
    });
  }

  export default CoursesList;
Comment

PREVIOUS NEXT
Code Example
Javascript :: convert online code javascript to python 
Javascript :: Sending e-mail using Mandrill API 
Javascript :: &quot;when.promise&quot; async await 
Javascript :: vue get key inside component 
Javascript :: how to route with credentials react 
Javascript :: downlaod file from website raect 
Javascript :: GET_FORM-VALUE 
Javascript :: find longest even string in array javascript 
Javascript :: appolo query data in angular graphql 
Javascript :: Bracket Spacing .prettierrc 
Javascript :: jasmine returnvalues example 
Javascript :: make a count button i js 
Javascript :: javascript grow function 
Javascript :: Finding Attribute value with playwright in node.js 
Javascript :: map and get last child in js 
Javascript :: tekenaja 
Javascript :: dynamic data fetching in datatable.net 
Javascript :: setinterval clearinterval querySelector until render 
Javascript :: simple-react-validator 
Javascript :: mindate from another datepicker 
Javascript :: default parameters in es6 
Javascript :: ajax:drop-down remove an d add select option 
Javascript :: javascript python like for loop 
Javascript :: close worker 
Javascript :: js plugin for drop down with images 
Javascript :: react onpaste get value 
Javascript :: express plus 
Javascript :: javascript covert html characters to text 
Javascript :: moment js formating to one day less using zulu time 
Javascript :: get twitter username from string javascript 
ADD CONTENT
Topic
Content
Source link
Name
6+2 =