ⱼ ₒ ₑ
ⱼ ₒ ₑ
SSolidJS
Created by ⱼ ₒ ₑ on 2/15/2025 in #support
Server function not being called (?)
Hey guys thank you for the tips It helped but the main issue was actually trying to use the typescript enum and pass it in
8 replies
SSolidJS
Created by ⱼ ₒ ₑ on 2/15/2025 in #support
Server function not being called (?)
It seems like it just breaks all interactivity on the file that is trying to use it, none of the client interactivity works
8 replies
SSolidJS
Created by ⱼ ₒ ₑ on 2/15/2025 in #support
Server function not being called (?)
I'm also on the latest version of all solid pkgs, start is v1.1.1 if it matters
8 replies
SSolidJS
Created by ⱼ ₒ ₑ on 2/14/2025 in #support
useContext is undefined
Passed prop children
36 replies
SSolidJS
Created by ⱼ ₒ ₑ on 2/14/2025 in #support
useContext is undefined
The theme and locale was fine because they weren't children
36 replies
SSolidJS
Created by ⱼ ₒ ₑ on 2/14/2025 in #support
useContext is undefined
Thank you all for your help I appreciate it
36 replies
SSolidJS
Created by ⱼ ₒ ₑ on 2/14/2025 in #support
useContext is undefined
I believe it's working now
36 replies
SSolidJS
Created by ⱼ ₒ ₑ on 2/14/2025 in #support
useContext is undefined
I think the destructuring at the top level was causing the issue
36 replies
SSolidJS
Created by ⱼ ₒ ₑ on 2/14/2025 in #support
useContext is undefined
Let me see that
36 replies
SSolidJS
Created by ⱼ ₒ ₑ on 2/14/2025 in #support
useContext is undefined
is it OK to just use splitProps everywhere then as a standard way to get props?
36 replies
SSolidJS
Created by ⱼ ₒ ₑ on 2/14/2025 in #support
useContext is undefined
I mean useContext is undefined no matter what everywhere
36 replies
SSolidJS
Created by ⱼ ₒ ₑ on 2/14/2025 in #support
useContext is undefined
Undefined everywhere regardless
36 replies
SSolidJS
Created by ⱼ ₒ ₑ on 2/14/2025 in #support
useContext is undefined
Yes
36 replies
SSolidJS
Created by ⱼ ₒ ₑ on 2/14/2025 in #support
useContext is undefined
Still undefined
36 replies
SSolidJS
Created by ⱼ ₒ ₑ on 2/14/2025 in #support
useContext is undefined
Atleast in the wrapper but I can try to log it in the component
36 replies
SSolidJS
Created by ⱼ ₒ ₑ on 2/14/2025 in #support
useContext is undefined
I think you are onto something though because thinking about it, the global layout components such as the theme dropdown and others are able to access their context just fine But the settings provider that's created in the dashboard provider still shows the useContext result as null when I log it there
36 replies
SSolidJS
Created by ⱼ ₒ ₑ on 2/14/2025 in #support
useContext is undefined
File based routing as the layout for a route group
36 replies
SSolidJS
Created by ⱼ ₒ ₑ on 2/14/2025 in #support
useContext is undefined
But just incase somehow something is going wrong here
36 replies
SSolidJS
Created by ⱼ ₒ ₑ on 2/14/2025 in #support
useContext is undefined
Logging it, it initializes everything properly, the value being passed isn't null
36 replies
SSolidJS
Created by ⱼ ₒ ₑ on 2/14/2025 in #support
useContext is undefined
export const SettingsProvider: Component<{ children: JSX.Element }> = (
props,
) => {
const [savedSettings, setSavedSettings] = makePersisted(
createStore<Settings>(defaultSettings),
PERSISTENCE_OPTIONS,
);
const [settings, setSettings] = createStore<Settings>(savedSettings);

return (
<SettingsContext.Provider
value={{ savedSettings, setSavedSettings, settings, setSettings }}
>
{props.children}
</SettingsContext.Provider>
);
};
export const SettingsProvider: Component<{ children: JSX.Element }> = (
props,
) => {
const [savedSettings, setSavedSettings] = makePersisted(
createStore<Settings>(defaultSettings),
PERSISTENCE_OPTIONS,
);
const [settings, setSettings] = createStore<Settings>(savedSettings);

return (
<SettingsContext.Provider
value={{ savedSettings, setSavedSettings, settings, setSettings }}
>
{props.children}
</SettingsContext.Provider>
);
};
This is the settings context provider
36 replies