You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I seem to be running into an infinite rerender loop with the following code:
exportconstRoom=memo(()=>{const{ peers, isLoading, publishPresence, error, user }=room.usePresence()useEffect(()=>{console.log('running effect')publishPresence({online: true})return()=>{publishPresence({online: false,})}},[publishPresence])returnnull})
What am I doing wrong? I could of course remove publishPresence from the dependency array and solve the issue, but that breaks rules of hooks lint rules, specifically react-hooks/exhaustive-deps. Could something not be memoized correctly on the usePresence hook provided?
I seem to be running into an infinite rerender loop with the following code:
What am I doing wrong? I could of course remove
publishPresence
from the dependency array and solve the issue, but that breaks rules of hooks lint rules, specifically react-hooks/exhaustive-deps. Could something not be memoized correctly on theusePresence
hook provided?I don't see any docs for this, but I'm also seeing
useSyncPresence
in examples. Does it replacepublishPresence
?The text was updated successfully, but these errors were encountered: