Passing data via Props
parent
3320200c59
commit
3c3b4472e2
@ -1,7 +1,13 @@
|
||||
import ListGroup from "./components/ListGroup";
|
||||
|
||||
function App() {
|
||||
return <div><ListGroup/></div>;
|
||||
let items = ["New York", "San Francisco", "Tokyo", "London"];
|
||||
|
||||
return (
|
||||
<div>
|
||||
<ListGroup items={items} heading="Cities"/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
export default App;
|
||||
export default App;
|
||||
|
||||
Loading…
Reference in New Issue