Open psociety opened 1 year ago
Hi! Thank you for creating SSWR!
I'm getting Error: Function called outside component initialization but i can't understand why. SSWR is called inside onMount. onMount -> wrapper method -> SSWR.
Error: Function called outside component initialization
Error trace:
Where it starts:
Wrapper method:
Versions:
"svelte": "^3.49.0", "svelte-preprocess": "^4.10.6", "vite": "^3.0.2", "sswr": "^1.7.0", "@sveltejs/vite-plugin-svelte": "^1.0.0-next.44",
I don't use SvelteKit
What i'm missing out? What i'm doing wrong? Cant SSWR be used inside promises?
Edit: I've tried upgrading "@sveltejs/vite-plugin-svelte": "^1.1.0", but didnt make any change.
"@sveltejs/vite-plugin-svelte": "^1.1.0",
Hi! Thank you for creating SSWR!
I'm getting
Error: Function called outside component initialization
but i can't understand why. SSWR is called inside onMount. onMount -> wrapper method -> SSWR.Error trace:![image](https://user-images.githubusercontent.com/29523682/198343081-620cd9c6-73c9-43a2-863a-98d0c9703ae1.png)
Where it starts:![image](https://user-images.githubusercontent.com/29523682/198343496-6ee67f09-7c34-4f8d-b810-7bf0a9eed761.png)
Wrapper method:![image](https://user-images.githubusercontent.com/29523682/198343881-3c56165a-f5e3-4793-b86c-143bb2c1e15b.png)
Versions:
I don't use SvelteKit
What i'm missing out? What i'm doing wrong? Cant SSWR be used inside promises?
Edit: I've tried upgrading
"@sveltejs/vite-plugin-svelte": "^1.1.0",
but didnt make any change.