But the SettingService.getSetting get called twice and that make 2 request to the api server.
But this only happen if the getElements method return some elements, if it return empty array handleRoute will not be called on the client
Is this the expected behaviour ? Or I am using it wrong ?
I just want to fetch data once when there is a request to a page and then wait for the result then render page
I have a page that fetch data when request to page
But the
SettingService.getSetting
get called twice and that make 2 request to the api server.But this only happen if the
getElements
method return some elements, if it return empty arrayhandleRoute
will not be called on the clientIs this the expected behaviour ? Or I am using it wrong ? I just want to fetch data once when there is a request to a page and then wait for the result then render page
Thank you