📅  最后修改于: 2022-03-11 15:02:32.550000             🧑  作者: Mango
import React, { useState } from "react";
function App() {
const [list, setList] = useState(" ");
const [items, updateOnClick] = useState([ ]);
function updateList(event) {
const valueEntered = event.target.value;
setList(valueEntered);
}
function updateClick(){
updateOnClick(list);
}
return (
{items.map(item => - {item}
) }
);}
export default App;