Skip to content

Instantly share code, notes, and snippets.

@Davidegloh
Created July 14, 2021 22:03
Show Gist options
  • Save Davidegloh/c038d5690e260b82bdc77d044cf84125 to your computer and use it in GitHub Desktop.
Save Davidegloh/c038d5690e260b82bdc77d044cf84125 to your computer and use it in GitHub Desktop.
[mon premier map]#map
import { useState } from "react";
import Item from "./Components/Item/Item";
function App() {
const [dataArr, setdataArr] = useState([
{nom: "David" },
{nom: "Burger" },
{nom: "King" },
]);
return (
<div className="App">
{dataArr.map(item => {
return <p>Nom {item.nom}</p>
})}
</div>
);
}
export default App;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment