Context undefined
I want to wrap my auth token from local storage in a ContextProvider. To this effect I've done this:
What am i doing wrong?
3 Replies
The context providers works with the counter example from the docs, so maybe it could be something with the solid start localStorage
Can you please show where you use the context?
I use it in a function like this:
Then I also have the TokenProvider in the root of my app:
Ok, I found the problem, just put the TokenProvider in useContext instead of TokenContext