-
Notifications
You must be signed in to change notification settings - Fork 15
Closed
Description
Hi,
My app features the ability for users to dynamically change the backend service they are using, and this selection drives the URL I need to connect to via socket.io. I've set the URL to useSocket to the current URL from a context provider, but when the URL changes I don't get a new socket connection to the updated URL. Is this something that is possible?
e.g.
const [environmentConfig] = useEnvironment();
const { socket, error, connected } = useSocket(environmentConfig.urls.backend);
When environmentConfig changes, socket remains connected to the previous URL
Metadata
Metadata
Assignees
Labels
No labels