map.js
import React from "react";
const numbers = [1, 2, 3, 4, 5];
const ListItems = numbers.map((number) => <li>{number}</li>)
// console.log(typeof ListItems)
export {
ListItems
};
map.js imported by App.js
import React, {
Component
} from "react";
import logo from "./logo.svg";
import "./App.css";
import Test from "./test";
import Clock from "./clock"
import Toggle from "./toggle"
import Page from "./mailbox"
import {ListItems} from "./map"
class App extends Component {
render() {
return (
<div className="App">
<Test/>
<Clock/>
<Toggle/>
<Page/>
***<ListItems/>***
//
</div>
);
}
}
export default App;