You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have solved this by duplicating ensureQuery to get hold of sakType from parents load function. This works, but it is cumbersome. I kind of bet there is a good pattern for this case, but I cannot seem to find it. It would be nice to be able to also add getLetterTemplateQuery to the routeContext, but using beforeLoad on brevvelgerRoute is ran before the data is available
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
First of all, awesome package. I love it!
I have a parent route that fetches som data with tanstack-query. That pattern works nicely with beforeLoad.
However, this route has a child-route whose query depends on a value from the
getSakQuery
resultI have solved this by duplicating
ensureQuery
to get hold ofsakType
from parents load function. This works, but it is cumbersome. I kind of bet there is a good pattern for this case, but I cannot seem to find it. It would be nice to be able to also addgetLetterTemplateQuery
to the routeContext, but usingbeforeLoad
onbrevvelgerRoute
is ran before the data is availableAny help is much appreciated 🙏
Beta Was this translation helpful? Give feedback.
All reactions