Its a simple Todo react app. I want to fetch the user input on the console. but i am not getting any as i type in the input box.
Its a simple Todo react app. I want to fetch the user input on the console. but i am not getting any as i type in the input box.
import { useState } from "react";
const Todo = () => {
const [Items, setItems] = useState("");
return (
<div>
<div>
<input
type="text"
value={Items}
onChange={(e) => setItems(e.target.value)}
/>
</div>
<div>
<p>Apple</p>
</div>
</div>
);
};
function App() {
return (
<div>
<h1>TODO</h1>
<Todo />
</div>
);
}
export default App;
if i understand you correctly