-
Notifications
You must be signed in to change notification settings - Fork 0
Felicia/dis 1592 jamsocket javascript add socketio back in #9
Felicia/dis 1592 jamsocket javascript add socketio back in #9
Conversation
src/client.ts
Outdated
this.openSocket() | ||
this._isReady = true | ||
this._onReady.forEach((cb) => cb()) | ||
this._onReady = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think a rebase/merge will remove these changes from this PR (since this has already landed in main
). Let me know if you run into any problems with this!
@@ -13,6 +13,7 @@ | |||
"./server": "./dist/server.js", | |||
"./client": "./dist/client.js", | |||
"./react": "./dist/react.js", | |||
"./socketio": "./dist/socketio.js", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to update the examples in the README
now that we've factored out the socketio stuff into its own import.
src/react.tsx
Outdated
@@ -16,6 +16,7 @@ export function SessionBackendProvider({ | |||
|
|||
useEffect(() => { | |||
setBackend(new SessionBackend(url, statusUrl)) | |||
console.log('session') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can drop this?
src/socketio.tsx
Outdated
backendUrl.pathname[backendUrl.pathname.length - 1] === '/' | ||
? backendUrl.pathname.substring(0, backendUrl.pathname.length - 1) | ||
: backendUrl.pathname |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can replace this whole expression with
const path = backendUrl.pathname.replace(/\/$/, '')
From the Slack convo we had - I've got a few small changes I pushed to a separate branch that I think gets things working here. You can see the changes (along with some comments) here: c73b9f3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Once this is landed, we'll want to cut a new version and publish to |
No description provided.