If I am using a singleton class why would I use a context
For example what is wrong with the above method.
2 Replies
in this case you don't need to unless you are using ssr
if you are using ssr and you don't want all users to have the same singleton you need to use context
There's a good example on this Stackoverflow post as well: https://stackoverflow.com/questions/75125127/why-to-use-context-and-provider-given-solidjs-reactivity
Stack Overflow
Why to use Context and Provider given SolidJS reactivity?
I have this SPA project which authenticates and authorizes its users via access tokens (JWT). These short-lived access tokens has their refresh tokens as well, so when they expire the app should re...