score:1

Accepted answer
const cards = (
  <Fragment>
    {categories.map((c, index) => ( // <-- use current index
      <Card style={{ width: "15.625rem", wordWrap: "break-word" }}>
        <CardMedia
          image={categoryImages[index].cImg} // <-- access by index
          className={classes.images}
        />
        <CardActionArea>
          ...

score:0

const cards = (           // <==== line 74
  <Fragment>
    {categories.map((c, index) => (
      <Card style={{ width: "15.625rem", wordWrap: "break-word" }}>
        <div>{catImage[index]}</div>

Related Query

More Query from same tag