Skip to content

Cache Provider: Add hooks to read and preload in dev mode #13439

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

Closed
dan-kez opened this issue Aug 19, 2018 · 2 comments
Closed

Cache Provider: Add hooks to read and preload in dev mode #13439

dan-kez opened this issue Aug 19, 2018 · 2 comments
Labels
Resolution: Stale Automatically closed due to inactivity Type: Feature Request

Comments

@dan-kez
Copy link

dan-kez commented Aug 19, 2018

This topic originally came up in a react-devtools discussion: facebook/react-devtools#1099 (comment).

Do you want to request a feature or report a bug?
Feature

What is the current behavior?
The package simple-cache-provider does not presently provide hooks to understand when we've pulled a resource for the first time, hit the cache, or dropped something from the cache due to MAX_SIZE.

Due to this, tools such as react-devtools cannot provide an interface around our cached resources which makes debugging / inspection harder.

What is the expected behavior?
It would be great if there was a way to expose callbacks / events for when the cache resource has resolved. An idea would be to fire these callbacks / events in the existing switch statement in read / preload if we are in __DEV__ mode.

With this information we could have a "redux-devtools"-esque interface to better understand where our data is coming from and when we're hitting the cache in dev mode.

Tools like this would also be useful to people new to the Suspend API to visually see their resources transition between the various record states.

@stale
Copy link

stale bot commented Jan 10, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution.

@stale stale bot added the Resolution: Stale Automatically closed due to inactivity label Jan 10, 2020
@stale
Copy link

stale bot commented Jan 19, 2020

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please create a new issue with up-to-date information. Thank you!

@stale stale bot closed this as completed Jan 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Stale Automatically closed due to inactivity Type: Feature Request
Projects
None yet
Development

No branches or pull requests

2 participants