What's your use case?
If you are using useEffect to deal with state side-effect the useEffect hook will only be called after the state has updated in a synchronous manner.
If let's say you you defining a useCallback function to change state, you are at the same scope of the setState which means you have direct access to new value as well.

https://gist.github.com/AndreiCalazans/929e4d879719f707ea4f5208f5fd86f9

Software Engineer - Head Of Vetting At G2i

Software Engineer - Head Of Vetting At G2i