Skip to content

Commit

Permalink
docs copy update
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeke Nierenberg committed Jun 24, 2022
1 parent f4ef544 commit dffd9fe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/app/content/docs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,12 @@ You can subscribe to state changes through a websocket. The socket endpoint is `
Here's an example of how to use the socket from the browser.

```js
const socket = new WebSocket("https://webreducer.dev/state-events?readKey=:your-read-key");
const socket = new WebSocket("wss://webreducer.dev/state-events?readKey=:your-read-key");

socket.addEventListener("message", (message) => {
const event = JSON.parse(message.data)
switch(event.type) {
case: "bulk-update":
case "bulk-update":
// do something with event.state
break;
case "new-state":
Expand Down

0 comments on commit dffd9fe

Please sign in to comment.