GrayG
Convex Communityโ€ข3y agoโ€ข
5 replies
Gray

`ConvexClient` questions

I was happy to see ConvexClient released and I recently swapped it into a couple of lightweight integrations I'd previously done with Preact Signals and Lit Reactive Controllers, replacing a similar "generic" reactive client I'd built myself on top of BaseConvexClient. ConvexClient ended up being more or less a drop-in replacement, which was great!

Having tried it out, I do have a couple of observations / questions; they aren't really support things, per se, but this forum channel seemed like a good spot to raise them.

1. My own client had support for optimistic updates, patterned after (and borrowing types from) the React client. I see that ConvexClient doesn't have optimistic-update support; I can imagine a few reasons why that might be and am curious to know what the actual one(s) are.
2. FYI, when I was doing my Preact Signals integration, I ended up adding a configuration option to my reactive client allowing the equivalent of ConvexClient's _transition() method (where callbacks are invoked) to be wrapped in a developer-provided function. This was so I could use Preact Signals' batch() function to optimize signal performance in the case where multiple Convex queries updated at once. I unfortunately no longer have the simple test cases I was using that led me to conclude this was necessary / desirable, but could probably reconstruct them.
Was this page helpful?