cheatsheets devlog search

2023-04-19

Sveltekit Gotchas

---
Title: Sveltekit Gotchas
Date: 2023-04-19
Sequence: 
Tags: []
---

A list of sveltekit gotchas, I'm going to tag the date as well as sveltekit seems to still be moving too much to be considered stable even at 1.0.

---

2023-04-19

To load an external script into a sveltekit project, you need to add the script via javascript injection and then run your code once the script loads.

https://github.com/sveltejs/kit/issues/9096

---

2023-04-19

$page.url should be considered read only. Duplicate it in a new variable and then use goto with that new variable to get the correct behavior. The key issue is that updating $page.url.searchParams doesn't result in the load function being executed correctly.

⇒ https://github.com/sveltejs/kit/issues/9510