Richard Banks
richardbanks.dev
Richard Banks
@richardbanks.dev
Programmer, Entrepreneur, Gamer, Learner of things

richardbanks.dev
One possible solution could be the context API. If you are using SvelteKit you can put an exported $state() variable in a {name}.svelte.[js|ts] file and then just import it and use it as needed.

svelte.dev/docs/kit/sta...
State management • Docs • Svelte
State management • Svelte documentation
svelte.dev
February 24, 2025 at 8:03 AM
I had similar problems with a previous project a while ago. For the most part I just tried to catch the errors earlier or and checks that would help prevent an error state from occurring.

Ended up abandoning Interia before I could have a proper look into the issue.
November 29, 2024 at 11:34 AM