SolidJSS
SolidJSโ€ข3y agoโ€ข
3 replies
theshadowboxers

Resource with createContext?

What is the correct way to return a Resource from a context? If you don't provide an initial value then you get an error when trying to call the
undefined
returned from the useContext call as a function, but if you provide an initial value of () => {} it seems that the context isn't updated reactively when the value createResource accessor is passed to the value prop of the provider?
Was this page helpful?