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
It seems using the location global is not allowed so when you use it to set variables in your socket.io configuration at
src/index.jsx, const socket = io(${location.protocol}//${location.hostname}:8090);
react simply won't load the page. I got around this by just typing in my protocol and hostname,
const socket = io(${window.location.protocol}//${window.location.hostname}:8090);
Not sure if this will have any bad side effects though.
Thanks for this awesome tutorial by the way!
The text was updated successfully, but these errors were encountered:
It seems using the location global is not allowed so when you use it to set variables in your socket.io configuration at
src/index.jsx, const socket = io(
${location.protocol}//${location.hostname}:8090
);react simply won't load the page. I got around this by just typing in my protocol and hostname,
const socket = io(
${window.location.protocol}//${window.location.hostname}:8090
);Not sure if this will have any bad side effects though.
Thanks for this awesome tutorial by the way!
The text was updated successfully, but these errors were encountered: