Hello, I tried to pass an array from one component to another one but when I do so, I get the message that todo.map is not a function even though I declared it to be an array in the parent element. Here’s the code
function Inputs({todo}){
return(
todo.map(todon => {return(
<input className="singleItem" value={todon}></input>
)})
)
}
Inside the parent component, I used let [todo, setTodo] = useState([])
and then I passed it as a prop to my Inputs component as <Inputs todo={todo} />