-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add untrack to load functions (#11311)
closes #6294
- Loading branch information
1 parent
052adf9
commit 5c89490
Showing
13 changed files
with
205 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@sveltejs/kit": minor | ||
--- | ||
|
||
feat: add untrack to load |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
packages/kit/test/apps/basics/src/routes/untrack/server/+layout.server.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export function load({ url }) { | ||
return { | ||
url: url.pathname | ||
}; | ||
} |
12 changes: 12 additions & 0 deletions
12
packages/kit/test/apps/basics/src/routes/untrack/server/[x]/+page.server.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export function load({ params, parent, url, untrack }) { | ||
untrack(() => { | ||
params.x; | ||
parent(); | ||
url.pathname; | ||
url.search; | ||
}); | ||
|
||
return { | ||
id: Math.random() | ||
}; | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/kit/test/apps/basics/src/routes/untrack/server/[x]/+page.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<script> | ||
export let data; | ||
</script> | ||
|
||
<p class="url">{data.url}</p> | ||
<p class="id">{data.id}</p> | ||
<a href="/untrack/server/2">2</a> |
5 changes: 5 additions & 0 deletions
5
packages/kit/test/apps/basics/src/routes/untrack/universal/+layout.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
export function load({ url }) { | ||
return { | ||
url: url.pathname | ||
}; | ||
} |
12 changes: 12 additions & 0 deletions
12
packages/kit/test/apps/basics/src/routes/untrack/universal/[x]/+page.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
export function load({ params, parent, url, untrack }) { | ||
untrack(() => { | ||
params.x; | ||
parent(); | ||
url.pathname; | ||
url.search; | ||
}); | ||
|
||
return { | ||
id: Math.random() | ||
}; | ||
} |
7 changes: 7 additions & 0 deletions
7
packages/kit/test/apps/basics/src/routes/untrack/universal/[x]/+page.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<script> | ||
export let data; | ||
</script> | ||
|
||
<p class="url">{data.url}</p> | ||
<p class="id">{data.id}</p> | ||
<a href="/untrack/universal/2">2</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters