This appears in the react web page
And this is my code in react
import axios from "axios";
import { useEffect, useState } from "react";
function App() {
const [listOfPosts, setListOfPosts] = useState([]);
useEffect(() => {
axios.get("http://localhost:5000/api/regist").then((res) => {
setListOfPosts(res.data);
});
}, []);
return (
<div className="App">
{listOfPosts.map((value, key) => {
return (
<div className="post">
<div className="title"> {value.email_U} </div>
<div className="body">{value.nome_U}</div>
<div className="footer">{value.pass}</div>
</div>
);
})}
</div>
);
}
export default App;
I try to put it into an array but still says that .map is is not a function