when I use the map in react, do I get an unexpected token error?
import React, { useState, useEffect } from "react";
import axios from "axios";
export default function ApiHook() {
const [employees, setEmployees] = useState([]);
useEffect(() => {
axios
.get("http://dummy.restapiexample.com/api/v1/employees")
.then((response) => {
console.log(response);
setEmployees(response.data);
})
.catch((e) => console.log(e));
}, []);
return (
{employees.map((employee) => {
return <p>{employee.employee_name}</p>;
})}
);
}