Open Jasonp1992 opened 1 year ago
been trying to crack this one for the past hour and a half with no luck, but it looks like the way to go is changing the state outside of the return
I believe this is in AlphabeticalFriendsSection in the Pressable
I have a sneaking suspicion that it is the part before the return that's keeping track of setParticipants state within the return
Error: Warning: Cannot update a component (
Participants
) while rendering a different component (ForwardRef(Pressable)
). To locate the bad setState() call insideForwardRef(Pressable)
, follow the stack trace as described in https://reactjs.org/link/setstate-in-renderIn: Participants
line: 337
(setParticipants([...participants, favorites])