I have a custom hook that processes a certain state variable.
Whenever you change the state It does not update immediately so I have to subscribe to it using useEffect.