I was wondering what the difference is between the server connect found in server side data and adding the server connect component? What I’ve noticed is that the server side data one is used more for security and on layout pages while the component is used more for fetching data. Not sure if this is just preference or if the two are different.
The server-side data is processed during the rendering of the layout and/or content page, which takes place before the App Connect code (or anything else) is loaded in the browser. You are correct, you can use this for security, and templating variables for meta data of the page.
Server connect elements are run after App Connect is loaded and can be used to call api’s in order to retrieve data, process logic and output results, trigger other functions, etc.
¿And happend if the server-side-data use the same Server Action in Server Connect element?
I means, it double the load?, it slow down the page because load first the server-side-data and then Server Connect with the same Server Action? or I’m wrong?
Or maybe using the same Server Action in both server-side and Server Connect, it keeps is some kind of cache avoiding the double load of the same Server Action?
@George @patrick @Teodor