I have a return statement in JSX. I need to delete the first element of the array and return the reduced array and then map it. But the app crashes on the line of reducing array.
I checked - this is an array. So I suppose this is about that I write JSX incorrectly. Please, could you help me.
return (
<div className="popup__toggle">
{let newArr = event.slice(1)}
{console.log(newArr)}
{newArr.map((item, index) => {
return(
<div>{item.name}</div>
)
)}
</div>
I need to delete the first index of the array and map it.