Closed jdgamble555 closed 1 year ago
The snackbar store is undefined until the client-side router kicks in to bind the component instance to the store. This is expected behavior from Svelte and unrelated to SMUI.
This is a duplicate of https://github.com/hperrin/svelte-material-ui/issues/524
@NickantX - This is not expected. Other UI Frameworks work fine in SvelteKit without having to crash.
I believe this is caused by an incorrect TypeScript configuration. I have no issues with using SMUI in SvelteKit, and the demo site is all done with SvelteKit's SSR. I'm going to close as a duplicate of #524. We can discuss there.
You can close this for me. I have done so many changes since this was open, but seems to be fixed when I remove the check for browser now. I have no idea how if got fixed.
Thanks for getting back to this package!
J
Most likely fixed vite side.
Describe the bug I updated to the latest version and I get this error while using Snackbar:
And message.svelte
Expected behavior No errors or 500 Server Error.
Additional context Work around is to check for browser:
But this should be done internally, potentially have a pseudo document object on serverside.
J