Skip to content

Commit

Permalink
readme: update code snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
mschristensen committed May 9, 2024
1 parent 86399e9 commit 0872034
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ To instantiate the Realtime Data Models SDK, create an [Ably client](https://abl

```typescript
import ModelsClient from '@ably-labs/models';
import { Realtime } from 'ably/promises';
import { Realtime } from 'ably';

const ably = new Realtime.Promise({ key: 'YOUR_ABLY_API_KEY' });
const ably = new Realtime({ key: 'YOUR_ABLY_API_KEY' });
const modelsClient = new ModelsClient({ ably });
```

Expand Down Expand Up @@ -126,7 +126,6 @@ async function updatePost(mutationId: string, content: string) {

// create a new model instance called 'post' by passing the sync and merge functions
const model = modelsClient.models.get({
name: 'post',
channelName: 'models:posts',
sync: sync,
merge: merge,
Expand Down

0 comments on commit 0872034

Please sign in to comment.