0.1.0-nocleanup • Published 6 years ago

u5-r2-query v0.1.0-nocleanup

Weekly downloads
3
License
ISC
Repository
gitlab
Last release
6 years ago

u5-r2-query

Support for querying an API (anything async, really), in the context of React/redux.

The query results are kept in a simple cache. This cache could become more sophisticated.

The core API is a higher order component query, which connects a query with a React component. The query consists of a string representing the query text, plus parameters (any object). This should suit most API query requirements.

The cache is refreshed whenever the connected components mounts (on componentWillMount).

How

npm install --save u5-r2-query

Follow the documented sample. You can run the sample with

npm run sample:basic

Example usage

./sample contains a simple example.

./sample-rerendering contains a sample that demonstrates the cache's "time-to-live", by forcing rerendering, which, depending on the cache having expired or not, results in re-fetching. This second example can be run with

npm run sample:rerendering
0.1.0-nocleanup

6 years ago

0.0.9-nocleanup

7 years ago

0.0.9

7 years ago

0.0.8

7 years ago

0.0.8-2

7 years ago

0.0.8-1

7 years ago

0.0.8-0

7 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4-2

7 years ago

0.0.4-1

7 years ago

0.0.4-0

7 years ago

0.0.3

7 years ago

0.0.3-0

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago