Error in the console
Answered
Persian posted this in #help-forum
Original message was deleted.
Answered by Highlander
idk man im new to using next js , but pretty sure the problem was with state
12 Replies
Highlander
i think you should change the dependency of useeffect from state to something else
@Highlander i think you should change the dependency of useeffect from state to something else
Persian
It should be state
Highlander
but then it should create a recursive loop for the useeffect ig
@Highlander but then it should create a recursive loop for the useeffect ig
Persian
So you mean the code i add in the useEffect of the changing of [state] is creating an infinie loop?
Highlander
yes cus the change is state triggers the useeffect and you change the state again
@Highlander yes cus the change is state triggers the useeffect and you change the state again
Persian
Solved the func but now getting this error
Highlander
idk man im new to using next js , but pretty sure the problem was with state
Answer
Highlander
in useeffect
@Persian can i ask why you deleted the post? it makes it harder for others to see the solution (ie making mark solution useless)
@Highlander idk man im new to using next js , but pretty sure the problem was with state
Persian
Hey im still getting same error even when i did remove the useEffect of that [state]
@riský <@589989048005689366> *can i ask why you deleted the post? it makes it harder for others to see the solution (ie making mark solution useless)*
Persian
I was trying to close it so i deleted it by wrong