I want my states to update after useEffect, yes I tried the dependency array method but whenever I put something in it, the component