eli
eli4d ago

is there a way to preload data in a

is there a way to preload data in a query from another related query? for example, say i have a list page that queries items.list. i click on an item which goes to a detail route and queries items.get(itemId). some/all of the item data is already in the list query. can i utilize that to avoid loading data we already have and provide instant results?
2 Replies
erquhart
erquhart4d ago
Welcome! You would generally do this by passing the data you have to the component via props (this is how I do it)
eli
eliOP3d ago
that's what i was thinking just wasn't sure if there was a better way. thanks!

Did you find this page helpful?