DEV Community

Beaver Bridge
Beaver Bridge

Posted on • Edited on

Sveltekit layout.svelte not call when page moved

페이지가 이동하면 +layout.svelte도 다시 읽어오게 해야하는데, layout.server.js, layout.js, layout.svelte가 호출되지 않는다.

옆자리 직원의 도움을 받아보니

export const load = async ({ locals, url, params }) => {
  const { pathname } = url;
  ...
}
Enter fullscreen mode Exit fullscreen mode

이렇게 +layout.server.js 의 load 에서 url을 받아와야 layout.js, layout.svelte도 호출됐다.

Top comments (0)

Image of Docusign

🛠️ Bring your solution into Docusign. Reach over 1.6M customers.

Docusign is now extensible. Overcome challenges with disconnected products and inaccessible data by bringing your solutions into Docusign and publishing to 1.6M customers in the App Center.

Learn more

Retry later