useContext not working properly
i am trying to use createContext in my solid app but it is not working properly giving undefined
11 Replies
hey i am getting undefined in the context consumer ...
i am directly giving signals value to the provider
in the consumer
try
value.Options()lol the value itself is undefined
ah yeah my bad
ok some weird stuff in my vs code's console the values is showing up
but no in browser
when i am manually saving the app.tsx it starting showing my browser also
but if i do anything beside app.tsx it again showing undefined
if you log onMount does it show value?
lemme try
nope
can you come vc :(
cant but can u send the entire component?
ahh it's not small i sent the smallest i could do
i mean i can show you live
would be better at solving
also to add.. i need to wrap suspense inside provide to actually see the result
if i am creating context in components it is not showing anything
@jer3m01
can't help much without the code
try creating a new context and component without anything else, if that works copy over piece by piece the rest
ok rookie mistake ig. was creating context in the same file.. which ig hot reload the file whenever another component tries to access it