feat: auth & admin
This commit is contained in:
+10
-10
@@ -13,15 +13,15 @@ If a value can be computed from current props/state, do not store it in state or
|
||||
|
||||
```tsx
|
||||
function Form() {
|
||||
const [firstName, setFirstName] = useState('First')
|
||||
const [lastName, setLastName] = useState('Last')
|
||||
const [fullName, setFullName] = useState('')
|
||||
const [firstName, setFirstName] = useState('First');
|
||||
const [lastName, setLastName] = useState('Last');
|
||||
const [fullName, setFullName] = useState('');
|
||||
|
||||
useEffect(() => {
|
||||
setFullName(firstName + ' ' + lastName)
|
||||
}, [firstName, lastName])
|
||||
setFullName(firstName + ' ' + lastName);
|
||||
}, [firstName, lastName]);
|
||||
|
||||
return <p>{fullName}</p>
|
||||
return <p>{fullName}</p>;
|
||||
}
|
||||
```
|
||||
|
||||
@@ -29,11 +29,11 @@ function Form() {
|
||||
|
||||
```tsx
|
||||
function Form() {
|
||||
const [firstName, setFirstName] = useState('First')
|
||||
const [lastName, setLastName] = useState('Last')
|
||||
const fullName = firstName + ' ' + lastName
|
||||
const [firstName, setFirstName] = useState('First');
|
||||
const [lastName, setLastName] = useState('Last');
|
||||
const fullName = firstName + ' ' + lastName;
|
||||
|
||||
return <p>{fullName}</p>
|
||||
return <p>{fullName}</p>;
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user