Solid · Partial valuesListening to one path (
Listening to one path (select)
A listener added with select(path).on is called immediately, then only when the value at that path changes. In the example card arrives complete in the first chunk: its listener is called for that chunk and not again while answer grows.
z.object({
card: z.object({ kind: z.string(), title: z.string() }),
answer: z.string(),
sources: z.array(z.string()),
})for (const part of ['card', 'answer', 'sources']) stream.select(part).on(() => calls.push(part))
Stream, chunk by chunk
{"card":{"kind":"answer","title":"Your seats"},['card']
Runs in this page on the installed package. The input and the expected output are defined by the example.