you can use "gap: 10px" with flexbox and not just grid
TS may be overkill and some prefer JSDoc over all else: maybe replace TS with JSDoc next project
if using TS, use pocketbase-typegen on npm
svelte syntax like "{#each}" works terribly with TS because svelte-check doesn't support it
ProperType | any
just so i could use a var that definitely was PoperType in the HTML (no TS in svelte html)any
instead of undefinedany
or first check that they aren't null with {#if model.expand} {model.expand.some_coll.some_expand_val_that_now_has_proper_type} {/if}
very explicit typing (remember) (cast from Record[] to PostsResponse[]): r.items as unknown as PostsResponse[]
the importance of flex-basis
(can make equal columns, i.e.)
sveltekit:
export const load = (async () => { let bg_img_url = "https://picsum.photos/960/1080" preload(bg_img_url) return { bg_img_url }; }) satisfies LayoutLoad;
```
export const prerender = true
in root +layout.tsload()
is important, for one because it caches: https://kit.svelte.dev/docs/load#rerunning-load-functionsload()
cannot be promises. i.e. you cannot export a promise and then {#await} it. load()
will always resolve your promises and is designed to load data before .svelte. you cannot, in other words, preload a {#await} expecting it to cancel if you click the page before preload finished.[slug]
change to be a different page, so all statements relying on the slug must be reactive statements specifically ($:
). invalidateAll
does nothing, same for stores. apparently this is intended behaviour.pocketbase
(@request.data.some_allowed:isset = true && @request.data.some_disallowed:isset = false)