Skip to content
Advertisement

Tag: use-effect

UseEffect only works after refresh the page

I am using an useEffect inside a Context. I think the useEffect should run after load the page, but it does not work, but if I refresh the page(F5) then it works. I am new Using React, but I think it should work with the empty array as arg. This is the Context: EDIT: Now I realized that the problem

Advertisement