From c48bcb8c2b54aea0975912dfebb7ce6f5f36b98d Mon Sep 17 00:00:00 2001 From: miteshsingla Date: Sun, 8 Oct 2023 19:30:02 +0530 Subject: [PATCH] Created Use State for the function components in App.js #4 --- password-generator/src/App.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/password-generator/src/App.js b/password-generator/src/App.js index 3784575..187d432 100644 --- a/password-generator/src/App.js +++ b/password-generator/src/App.js @@ -2,6 +2,13 @@ import logo from './logo.svg'; import './App.css'; function App() { + const [password, setPassword] = useState(''); + const [passwordLength, setPasswordLength] = useState(8); // I've kept default length of password as 8 + const [includeUpperCase, setIncludeUpperCase] = useState(false); + const [includeLowerCase, setIncludeLowerCase] = useState(false); + const [includeNumbers, setIncludeNumbers] = useState(false); + const [includeSymbols, setIncludeSymbols] = useState(false); + return (