Don't update local currentTime state unnecessarily #12
Labels
area: game runtime
Improvements to the core game experience.
good first issue
You can do this as a way to learn about the code! ❤
status: accepting prs
This issue is ready for a pull request.
type: cleanup
Improving the structural quality of code or runtime smoothness/performance.
Following #9: right now,
useTimeSynchronization
updates both the localroomData.currentTime
and the server state:karaokenite-react/src/pages/room/RoomEvents/useVideoControls/useTimeSynchronization.ts
Lines 16 to 20 in 6c26f5c
Nothing in local UI should actually subscribes to
currentTime
... and even if we do add something that does, we already receive updates from the server whenevercurrentTime
or any other room data updates.Proposal: as a performance improvement,
emit
the newcurrentTime
to the server directly, without also setting it in React state.The text was updated successfully, but these errors were encountered: