broox
Help issuing consecutive api requests, where the second is dependent on the first
for now, i solved this by splitting the queries into a parent page that almost exclusively just fetches the
album
via one composable... and then pushing all the other logic, including the composable that loads the photos
into child component.15 replies
Help issuing consecutive api requests, where the second is dependent on the first
right now, the best way for this to work, in my mind is to move the second composable to a child component and attempt to send relevant metadata up to the parent... but i am also having issues with the parent rendering that data on the server side.
15 replies
Help issuing consecutive api requests, where the second is dependent on the first
moving the second composable into a child component has seemingly been the most reliable way for me issue the 2 requests, however sharing the state from the child component to the parent has been unreliable on the server side.
i can play with
immediate
and watch
to execute the second query once i am sure album_id
is set15 replies
Help issuing consecutive api requests, where the second is dependent on the first
word, i understood that it used
useFetch
and $fetch
(ofetch
) under the hood, but it has worked reliably for me with SSR thus far.
the only place i'm having trouble is where i have dependent requests, and the main reason that i would like to use my composables is that they handle pagination, caching, etc, and i call them from many different places.15 replies
Help issuing consecutive api requests, where the second is dependent on the first
i tried moving the
useGetPhotos
call into a child component that is rendered on the page to isolate it. this seemed to work, however i want some data from the useGetPhotos
call to be available on the parent page via SSR (e.g. the composable status
and a photoCount
that is returned by the API call).
i tried various approaches to acheiving this, using provide/inject
, defineExpose
, etc. but was running into weirdness where these values were not rendered on the server. they were available on the client though.15 replies