Avoid using this.state inside this.setState() (#1176)

* Update LoginPage.jsx

* Update LoginPage.jsx
This commit is contained in:
SAI SUMANTH KUMAR 2021-10-21 23:10:51 +05:30 committed by GitHub
parent cf4e28c59e
commit 9b59d0820b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -24,7 +24,7 @@ class LoginPage extends React.Component {
};
handleOnCheck = () => {
this.setState({ showPassword: !this.state.showPassword });
this.setState((prev) => ({ showPassword: !prev.showPassword }));
};
authUser = (e) => {