Create the project
Create your first app scaffolds the React and Vite notes starter. Its frontend isapps/main/src/main.tsx; its app tree is
bijection/app.ts.
Connect, watch and mutate
apps/main/src/main.tsx
app export gives typed references to the app’s exposed functions. useWatch keeps the latest notes live, and useMutation answers a
Result: { ok: true, value }, or { ok: false, code, message } for a
ctx.refuse(code, message) or a host refusal. The form needs no
try/catch.
Add Bijection to an existing React frontend
- Install
@bijectionhq/bijectionin the frontend package. - Set
"browserClient": truein the backend’sbijection.jsonand runbijection check --write-lock. Importappandconnectfrom.bijection/_generated/client.tsin that project. - Set the installation URL, for example as
VITE_BIJECTION_URL. - Connect once and wrap the tree in
<Bijection client>, as above.