Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a hook to get resource controller only #19

Open
otakustay opened this issue May 6, 2022 · 0 comments
Open

Add a hook to get resource controller only #19

otakustay opened this issue May 6, 2022 · 0 comments

Comments

@otakustay
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant