You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assuming createResource is implemented to work akin to createContext, we could have a useResource API like useState to register a resource dependency. The resource will return a tuple – the data and a dispatcher to update the data.
Taking facebook/react#14248 as an example, the following model might look something like:
Hi, thanks for your suggestion. RFCs should be submitted as pull requests, not issues. I will close this issue but feel free to resubmit in the PR format.
Assuming
createResource
is implemented to work akin tocreateContext
, we could have auseResource
API likeuseState
to register a resource dependency. The resource will return a tuple – the data and a dispatcher to update the data.Taking facebook/react#14248 as an example, the following model might look something like:
The text was updated successfully, but these errors were encountered: