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

A new step forward #15

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open

A new step forward #15

wants to merge 17 commits into from

Conversation

vlad-zhukov
Copy link
Owner

@vlad-zhukov vlad-zhukov commented Nov 6, 2019

  • Use undefined instead of null
  • get -> read
  • data should always be undefined when args are undefined
  • move options from createResource to hook
  • refresh -> invalidate, and think of better invalidation strategy
  • remove maxSize because it's an implementation detail
  • stop autorefreshing when tab is not focused and offline
  • paging API
  • maxAge -> refreshInterval

TODO:

  • simplify meta
  • fix refreshOnMount only invalidates the first page
  • rework page updates
  • do not refresh after errors

@vlad-zhukov vlad-zhukov changed the title A new step A new step forward Nov 6, 2019
@codecov
Copy link

codecov bot commented Nov 6, 2019

Codecov Report

Merging #15 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff           @@
##           master    #15    +/-   ##
======================================
  Coverage     100%   100%            
======================================
  Files           6      6            
  Lines         254    400   +146     
  Branches       51     86    +35     
======================================
+ Hits          254    400   +146
Impacted Files Coverage Δ
src/utils.ts 100% <100%> (ø) ⬆️
src/createResource.ts 100% <100%> (ø) ⬆️
src/Resource.ts 100% <100%> (ø) ⬆️
src/index.ts 100% <100%> (ø) ⬆️
src/Cache.ts 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 24b35ea...e0a8f17. Read the comment docs.

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

Successfully merging this pull request may close these issues.

1 participant