I am currently facing this error:
Line 14:11: Expected an assignment or function call and instead saw an expression no-unused-expressions My code looks this way:
import React, { Component } from "react"; import { Checkbox } from "./Checkbox"; export const Tasks = () => { const tasks = []; let projectName = ""; return ( <div className="tasks" data-testid="tasks"> <h2 data-testid="project-name">{projectName}</h2> <ul className="tasks__list"> {tasks.map(task => { <li key={task.id}> <Checkbox id={task.id} /> <span>{task.task}</span> </li>; })} </ul> </div> ); }; According to the error, the problem occurs on the line <li key={task.id}>. I read other posts related to this error but couldn't fix it.