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
Making requests for the menu items and options on both the menu and cart pages of the site is unnecessary in sveltekit's SPA structure. Instead, let's make a request for the menu items and options inside the __layout file of routes directory, which will only run once when the user loads either the cart or menu pages. When the user switches between the two, this file won't run.
To get the data from the __layout file into the actual pages (menu and cart), you can either use Svelte's context API or a store. I recommend a store in this case.
The text was updated successfully, but these errors were encountered:
Making requests for the menu items and options on both the menu and cart pages of the site is unnecessary in sveltekit's SPA structure. Instead, let's make a request for the menu items and options inside the __layout file of routes directory, which will only run once when the user loads either the cart or menu pages. When the user switches between the two, this file won't run.
To get the data from the __layout file into the actual pages (menu and cart), you can either use Svelte's context API or a store. I recommend a store in this case.
The text was updated successfully, but these errors were encountered: