-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Running into the following errors both when hitting https://hapi-react-fullstack-bp.herokuapp.com/chat:
Uncaught (in promise) TypeError: socket.on is not a function
As well as this one:
Uncaught TypeError: socket.emit is not a function
when trying to submit a message in the chat.
I see that you are setting a global variable here:
| global.socket = connectNes(store, wsUrl) |
which you reference in Chat.js:
| if (socket) { |
const wsUrl = `ws${window.location.protocol === 'https:' ? 's' : ''}://${window.location.host}`
global.socket = connectNes(store, wsUrl)
?
Metadata
Metadata
Assignees
Labels
No labels