Choosing liaise
Where it runs
Read this page to check that liaise runs where your code runs. liaise has no dependencies. It uses fetch and the standard web types that come with it, such as Headers and AbortController.
Runtimes
| Runtime | Status |
|---|---|
| Node 20, 22, 24 | Tested in CI |
| Browsers, Bun, Deno, Cloudflare Workers | Should work (standard fetch), not tested in CI |
| React Native | Uses its built-in fetch, not tested in CI |
“Should work” means each of these has the standard fetch liaise uses, but CI doesn’t run the tests there. If something breaks on one of them, a bug report that names the runtime and its version helps.
liaise sends with the global fetch unless you give the client one. If your runtime’s fetch isn’t the global one, such as a Cloudflare service binding’s or undici’s with its own dispatcher, pass it as fetch (createApi options). Pass a service binding’s fetch in a wrapper, (url, init) => env.SERVICE.fetch(url, init), because liaise calls fetch unbound.
React Native
On React Native, where AbortSignal.timeout is missing, timeout falls back to a timer, so a deadline still ends the call with kind 'timeout'. If the runtime drops abort reasons, a call that runs out of time may come back as 'abort' instead of 'timeout' (the six kinds).
Any framework
liaise has no hooks and no framework code. A client is a plain object of functions that return promises, so it works in React, Vue, Svelte, Solid, Angular, server loaders, workers and scripts. The recipes show it with TanStack Query, React, a store and a server.
Next: That’s Choosing liaise. The reference lists every option and export, starting with createApi options.