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
Hey! I have the following scenario. Parent route A contains an optional child route B. In terms of URLs, A is /foo and B is /foo/$fooId. A on its own is a list of foos. B is a detail view for a single foo.
Here's the fun part. When loading /foo, we fetch one page of foos and render it. However, when loading /foo/$fooId, we want to load n pages of foos until the loaded data either contains $fooId or we run out of pages.
Therefore, I need to access params.fooId in A so we can check the loader against it. How can I do that?
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
-
Hey! I have the following scenario. Parent route A contains an optional child route B. In terms of URLs, A is
/foo
and B is/foo/$fooId
. A on its own is a list of foos. B is a detail view for a single foo.Here's the fun part. When loading
/foo
, we fetch one page of foos and render it. However, when loading/foo/$fooId
, we want to load n pages of foos until the loaded data either contains$fooId
or we run out of pages.Therefore, I need to access
params.fooId
in A so we can check the loader against it. How can I do that?Beta Was this translation helpful? Give feedback.
All reactions