diff --git a/src/App.js b/src/App.js index 7042849..8a08ac5 100644 --- a/src/App.js +++ b/src/App.js @@ -5,7 +5,7 @@ import produce from 'immer'; import { useState } from 'react'; function App() { - const Notes = props => props.data.map(note =>
{note.text}
); + /*const Notes = props => props.data.map(note =>
{note.text}
); const initialData = [{ text: 'Hey' }, { text: 'There' }]; const [data, setData] = useState(initialData); @@ -26,6 +26,22 @@ function App() { ); -} +}*/ + const [fName, setfName] = useState(''); + + const submitValue = () => { + const frmdetails = { + 'First Name' : fName + } + console.log(frmdetails); + }; + return( +
+ setfName(e.target.value)} /> + +
+ ); + } + export default App;