Don't know why solid context complains it is not called in the right place
https://github.com/kuskusapp/kuskus code of app
the thing I don't understand is that we have this store https://github.com/kuskusapp/kuskus/blob/main/src/GlobalContext/userDetails.ts
it wraps the whole app here: https://github.com/kuskusapp/kuskus/blob/main/src/pages/App.tsx#L69
including for example <Settings component https://github.com/kuskusapp/kuskus/blob/main/src/pages/App.tsx#L94
however when I run the app and try to render Settings, I get this error
GitHub
GitHub - kuskusapp/kuskus: Fast fully keyboard driven todo app with...
Fast fully keyboard driven todo app with GitHub integration and AI features - GitHub - kuskusapp/kuskus: Fast fully keyboard driven todo app with GitHub integration and AI features
GitHub
kuskus/userDetails.ts at main · kuskusapp/kuskus
Fast fully keyboard driven todo app with GitHub integration and AI features - kuskus/userDetails.ts at main · kuskusapp/kuskus
GitHub
kuskus/App.tsx at main · kuskusapp/kuskus
Fast fully keyboard driven todo app with GitHub integration and AI features - kuskus/App.tsx at main · kuskusapp/kuskus
9 Replies
it makes no sense to me as
Settings.tsx
is wrapped in the context of UserDetailsProvider
unless the way the context is used is wrongGitHub
kuskus/userDetails.ts at main · kuskusapp/kuskus
Fast fully keyboard driven todo app with GitHub integration and AI features - kuskus/userDetails.ts at main · kuskusapp/kuskus
is error that throws, so there is no ctx
its based of this store https://github.com/kuskusapp/kuskus/blob/main/src/GlobalContext/todo-list.ts that does work
GitHub
kuskus/todo-list.ts at main · kuskusapp/kuskus
Fast fully keyboard driven todo app with GitHub integration and AI features - kuskus/todo-list.ts at main · kuskusapp/kuskus
code wise it should be same unless I missed something
thank you for any help ❤️
Change all your extensions (from ts) to tsx
This is a dev mode issue with our vite plugin, which is difficult enough to fix that it seems to be regarded as a wontfix
Every tsx file gets a duplicate version of every ts file it imports
Which is fine if the ts files are stateless, but since your context is stateful, getting a duplicate means context will always be empty
It should enough to just change the extension for the file the context is defined in
was silly issue
thanks though @foolswisdom
Alright, great 👍
I've definitely had the extension issue before, though it's possible that it was only am issue with library code