Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/collections/electric-collection.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,9 +187,9 @@ async function generateTxId(tx) {
Electric is typically deployed behind a proxy server that handles shape configuration, authentication and authorization. This provides better security and allows you to control what data users can access without exposing Electric to the client.


Here is an example proxy implementation using TanStack Starter:
Here is an example proxy implementation using TanStack Start:

```js
```typescript
import { createServerFileRoute } from "@tanstack/react-start/server"
import { ELECTRIC_PROTOCOL_QUERY_PARAMS } from "@electric-sql/client"

Expand Down Expand Up @@ -311,7 +311,7 @@ Manually wait for a specific transaction ID to be synchronized:
// Wait for specific txid
await todosCollection.utils.awaitTxId(12345)

// With custom timeout (default is 30 seconds)
// With custom timeout (default is 5 seconds)
await todosCollection.utils.awaitTxId(12345, 10000)
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ onInsert: async ({ transaction }) => {

## Utility Methods (`collection.utils`)

- `awaitTxId(txid, timeout?)` -- wait for txid in Electric stream; default timeout 30s
- `awaitTxId(txid, timeout?)` -- wait for txid in Electric stream; default timeout 5s
- `awaitMatch(matchFn, timeout?)` -- wait for message matching predicate; default timeout 3000ms

### Helper Exports
Expand Down
Loading