Skip to content
Discussion options

You must be logged in to vote

Fixed in fce5d1e, there was a bug with context restoration

You can do something like

const useNextNextLoader = defineColadaLoader(ROUTE_NAME, {
  key: (to) => [ROUTE_NAME, ...NEXT_QUERY_KEY(TODO)],
  query: async (to, { signal }) => {
  const next = await useNextLoader();
  return getNext(next)
  },
});

the issue is that the key must be definable before and without async, ideally it should come from to. I might want to introduce a different syntax that allows passing parameters but that would go against the point of data loaders: they should be callable just by knowing the navigation. However, in your case this still technically holds tru since the parameter comes from another loader. I w…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@penpenpng
Comment options

@posva
Comment options

posva Mar 8, 2026
Maintainer

Answer selected by posva
@penpenpng
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2652 on March 08, 2026 08:59.