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.
Current the only way to get controller for a specific resource is
useResourceanduseConstantResource, 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
ListItemcomponent.We need
useResourceControlleranduseConstantResourceControllerhooks to satisfy these scenarios.