key is not available as prop in the Child component in ReactJs
问题 I have a parent component in which below component is producing dynamically in map function as below: const renderListing = this.props.listing.map(function(list, index) { return ( <Listing key={index} title={list.title} totalWorkers={list.totalWorkers} /> ); }, this); In this <Listing /> component, I have a Checkbox from react-md as below: import { Checkbox } from "react-md"; class Listing extends React.Component { render() { return ( <Checkbox id="`listSector-${this.props.key}`" name="list