huntabyte / showcase

Full stack application built with SvelteKit & PocketBase.
109 stars 30 forks source link

New class on every request? #13

Open wojtekgalaj opened 9 months ago

wojtekgalaj commented 9 months ago

Hi,

So, I had a few beers and my vision is a bit blurry. I am looking at this example and I can't figure out how instantiating a new pocketbase client on every request is not a bad idea.

Would you be so kind as to shed some light on this? Everything else clicks in a very satisfying way, just this bit...

https://github.com/huntabyte/showcase/blob/af18061676311c6d8938dce3865ed043b903063d/apps/web/src/hooks.server.js#L5