-
Does the useTransition work with useQueryStates? I test it with useQueryState and it worked as expected in the docs but if i set it like this const [pagination,setPagination] = useQueryStates({page: parseAsInteger.withOptions({startTransition}), pageSize: parseAsInteger.withOptions({startTransition})}) The transition isLoading doesnt seem to trigger in the case of query keys that should always move together. If I am using it wrong, that is highly likely. If anyone knows that was be awesome! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
In const [pagination, setPagination] = useQueryStates(
{
page: parseAsInteger,
pageSize: parseAsInteger
},
{
// Options go here
startTransition
}
) It's a bit confusing though, since there would be three places to define options (per parser with Most of the time, setting an option will apply to the whole update anyway (like Anyway, this calls for a docs update and fixing the parser-level options not being accounted for, thanks for fishing this one out! |
Beta Was this translation helpful? Give feedback.
-
This worked! thanks a lot for that clarification :D |
Beta Was this translation helpful? Give feedback.
In
useQueryStates
, the options are passed not per-parser, but at the global level in a second parameter, so this should work:It's a bit confusing though, since there would be three places to define options (per parser with
.withOptions
, in the second parameter to apply to all keys, and at the call level). Not sure what the proper override order should be between the first two. Probably (in order of precedence) call level, then parser level, then hook level, then defaults.Most of the time, setting an option will apply to …