convex
convex copied to clipboard
`Convex.acquire` uses `Stores.current()` as default
This is counter-intuitive because Convex.create() accepts an optional store. Hence, it is expected that the user given one would be used as default store.
A side effect is that when you call directly acquireState(), it tries to resolve refs relative to the thread-local store instead of using the user given one at .create().
I think no method on Convex should accept a store but .create() for setting the default one. What do you think?
Acquire probably only makes sense if you want to acquire the data for the store you are using in the current thread?
In general, all the Convex methods assume you are using the correct store on the current thread. The optional store argument is possibly not even required.