Live collaboration
Custom apps are live by default. When someone changes a table the app uses — in another tab, on another phone, in the table itself or through an AI assistant — the app hears about it and redraws. No refresh button, no polling.
Two kinds of live data
| | Shared by | Stored | Use it for |
|---|---|---|---|
| **Tables** | Everyone who can open the table | In the data table | Records that last: lists, scores, answers, expenses |
| **`think.state`** | One viewer — all their tabs and their AI assistant | On OpenThink's server, per page per viewer | What's on that person's screen right now: a board position, a step, a selection |
React to table changes
When a table changes anywhere, the page receives a `think:data` event with the table's name. Re-query and redraw:
```js
addEventListener("think:data", (e) => {
if (e.detail.table === "Checklist") draw();
});
```
This is how several people can use the same app at once: a teacher's dashboard fills in as students submit, and a family checklist ticks itself on every phone. See [Build a live checklist app](https://openthink.app/n/b0a6b1604e9e).
Share live state with an AI assistant
`think.state` is a small JSON object the viewer and their AI assistant (via [OpenThink MCP](https://openthink.app/n/386121a81507)) both read and write. You make a chess move and the assistant sees the new position; the assistant sets up a position and the board on your screen changes.
```js
draw(think.state);
think.setState({ fen, lastMove: "e2e4" }); // shallow merge; null removes a key
addEventListener("think:state", (e) => {
draw(e.detail.state); // e.detail.by is "mcp" or "web"
});
```
- Up to 16,000 characters in total.
- On load, `think.state` may be empty for a moment before the saved state arrives in a `think:state` event. Only call `setState` in response to the viewer's actions — writing defaults on startup would overwrite the saved state.
- Not saved for signed-out viewers, fixed versions, the code view or the iPhone app.
Keep links in sync
Put the view's state — selected tab, year, filter — in the URL with `think.params`, so a shared link opens exactly the same view for the next person:
```js
think.setParams({ tab: "month" }, { push: true });
addEventListener("think:params", draw); // Back / Forward
```
Next
- [Connect with AI](https://openthink.app/n/ac98965817ff) — let your assistant build, drive and play along with your app
- [Connect your database](https://openthink.app/n/03134f0f5a9f) — read and write rows
- [Authentication, authorization & accounting](https://openthink.app/n/b78dd1e6ad82) — who may see and change what