Open andvlad opened 1 year ago
How do you server JSON file with translations?
Actually I don't want to use JSON files for now. I want to use default translations in the component.
But createI18n.get
is mandatory, so I just put there cross-fetch request which doesn't return anything, because I thought it would be leveraged only on locale changes. And I don't change locales for now.
I also tried to directly import JSON files with import()
.
But error still the same (I created some placeholder JSON files for this)
Sorry, have no idea. Code looks fine. Maybe some strange bug with Preact?
I copied the code from useStore
to the local hook and it started working. (I updated example)
Quite strange thing
Hello.
I'm using
Preact
+vite-plugin-ssr
anduseStore
gives me an error: TypeError: Cannot read properties of undefined (reading '__H') So far, I haven't been able to figure out what the problem is. Maybe I'm doing something wrong. ExampleIt would be great if anyone has any ideas Thanks