**My State**

```
const [isEnabled, setIsEnabled] = useState(false);

```

**GetUser()**

```
    async function getUser() {
         verifyEmail(getTokenIdFromURL); /* Updates field in backend from false -> true */
         await Axios.get(URL+getTokenIdFromURL).then(function (response) {
         setIsEnabled(response.data.enabled) /* Checks if updated value is true and updates state */
        })
    }

```

**UseEffect()**

```
    useEffect(() => {
        getUser();
        return () => {
            /* */
        };
    }, []);

```

**Return**

```
    return (
       <div className="emailVerificationWrapper">
        {isEnabled ? <h1>true</h1> : <EmailVerificationFailed /> }
       </div>
    )

```

**Return** is rendered before the **`setIsEnabled`** which causes the final result to be `false`, but if i reload the website(or console log the state value), it is set to `true`(as desired).

> 
> How can i make the `setIsEnabled` to update the state before my applications renders the `return`?
> 
> 
>