Next.js Discord

Discord Forum

websocket hooks or context

Unanswered
Spotted Redshank posted this in #help-forum
Open in Discord
Spotted RedshankOP
I have a hook which updates the cursor on move with websockets, im conserned for the performance because I do use that hook in5 files won't this create a listener 5 times and lag my site?

Would it be better to put thr listeners in a context?

0 Replies