From b8cb04e7f11e0e97ae1423f147ba9b9420725786 Mon Sep 17 00:00:00 2001 From: rosh Date: Mon, 6 Jul 2020 11:35:11 +0530 Subject: [PATCH] app.js changes --- src/App.js | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) 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;