I'm trying to render on my page checkboxes from an object with the key-values of the array and their value(the goal at the end is to select the key-value and all the value will be selected).
My problem now is when I'm trying to only render all of this value its simply not. Example of code:
import React from "react";
import "./SelectMasekhtot.css";
let fakeData = {
book1: [1, 2, 3, 4, 5],
book2: [1, 2, 3, 4, 5],
book3: [1, 2, 3, 4, 5],
book4: [1, 2, 3, 4, 5],
};
const SelectMasekhtot = () => {
return (
<div className='containerSelectMasekhtot'>
<h1>selection part</h1>
<div>
{Object.entries(fakeData).forEach(([key, value]) => (
<li>
<span className='input-label'>{key}</span>
<span className='input-label'>{value}</span>
</li>
))}
</div>
</div>
);
};
export default SelectMasekhtot;
I don't get why it seems so easy and simply not rendering. I created a function to console log the results and I get them it is simply not rendering.