@alexjamesmalcolm/use-resource
TypeScript icon, indicating that this package has built-in type declarations

0.2.4 • Public • Published

npm GitHub Workflow Status (branch) Coveralls github npm bundle size MIT License

useResource

This is a React custom hook meant for assisting in the retrieval of remote data and the caching of it once acquired using redux.

Documentation

Read the documentation, if there's a concept you'd like further explained or a feature you would like requested you can open an issue.

TODO

  • Allow for custom reducer names
  • Internalize state management so reducer does not need to be exported
  • Allow passing a function instead of a number to ttl in case it needs to be determined programmatically.
  • Mask my personal email address with GitHub's privacy email address
  • Implement dependency array to replace resourceId
  • Somehow get a unique identifier from supplied getResource function to replace resourceId

Package Sidebar

Install

npm i @alexjamesmalcolm/use-resource

Weekly Downloads

2

Version

0.2.4

License

MIT

Unpacked Size

46.1 kB

Total Files

25

Last publish

Collaborators

  • alexjamesmalcolm