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
This only appears in local dev. usePartySocket changes the clientId when I save a file that causes a HMR update.
(partysocket/react is only affected, server works fine)
Open http://localhost:5173/
Save App.tsx, Page.tsx, etc
The socket.id changes on HMR.
I would expect the socket state to remain as other state values don't get affected by a HMR. I did a quick look into the hook and believe the ref/state memo is triggering a re-connect.
The text was updated successfully, but these errors were encountered:
This only appears in local dev.
usePartySocket
changes the clientId when I save a file that causes a HMR update.(partysocket/react is only affected, server works fine)
Repro: https://github.com/stephenlacy/partykit-repro-2
Open http://localhost:5173/
Save App.tsx, Page.tsx, etc
The
socket.id
changes on HMR.I would expect the socket state to remain as other state values don't get affected by a HMR. I did a quick look into the hook and believe the ref/state memo is triggering a re-connect.
The text was updated successfully, but these errors were encountered: