useData called on property change #1544
-
I added My export async function data() {
const response = await fetch(myEndpointUrl, {
method: 'GET'
});
const data = await response.json();
// data.meta contains the current request's page and pageSize
// data._links contains api urls for the previous and next page of the request
return [ data.data, data.meta, data._links ];
} And my |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
See 6b99bfd but let me know if you still have questions. |
Beta Was this translation helpful? Give feedback.
-
Hi @brillout it seems I should be using API routes or RPC for my use case. I will check them out and try to apply them. |
Beta Was this translation helpful? Give feedback.
-
Just so that I know if I understood the use of telefunc in my case, I would keep the data hook to get the initial data for my page, but then for my navigation component (next and previous url) I would use the telefunc methods to fetch the data. Am I correct? |
Beta Was this translation helpful? Give feedback.
See 6b99bfd but let me know if you still have questions.