Published
Edited
Jun 5, 2022
2 stars
Also listed in…
Convex
Tips and Utilities
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
c = import("https://esm.run/convex-dev/react")
Insert cell
origin = "https://handsome-gerbil-906.convex.cloud"
Insert cell
client = new c.ConvexReactClient(origin)
Insert cell
queryGenerator = (client, query, ...args) => {
const watch = client.watchQuery(query, ...args);
return Generators.observe((notify) =>
watch.onUpdate(() => notify(watch.localQueryResult()))
);
}
Insert cell
clientMessages = queryGenerator(client, "listMessages")
Insert cell
sendMessage = client.mutation("sendMessage")
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more