so I'm trying to display 9 jokes. I can only display 1 joke now, This is what it says on the console :
Object { error: false, amount: 9, jokes: (9) […] }
amount: 9
error: false
chistes1: Array(9) [ {…}, {…}, {…}, … ]
<prototype>: Object { … }
app.js:35:10
)
Any ideas what I'm I missing?
This is what I have so far:
function appInfo() {
const [chistes1, goingChis] = React.useState([]);
React.useEffect(() => {
fetch(url)
.then((Response) => Response.json())
.then((data) => goingChis(data));
}, []);
return (
<div className="card">
<h1>{chistes1.setup}</h1>
<p>{chistes1.delivery}</p>
</div>
);
}