Add a hook to get resource controller only
otakustay opened this issue · comments
Current the only way to get controller for a specific resource is useResource
and useConstantResource
, but their return values are tuples containing [value, controller]
.
In some cases, we only need resource controller to perform a expire or refresh of cache entry, such as to delete an item in a list from ListItem
component.
We need useResourceController
and useConstantResourceController
hooks to satisfy these scenarios.