0.1.0-nocleanup • Published 8 years ago

u5-r2-query v0.1.0-nocleanup

Weekly downloads
3
License
ISC
Repository
gitlab
Last release
8 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

8 years ago

0.0.9-nocleanup

8 years ago

0.0.9

8 years ago

0.0.8

8 years ago

0.0.8-2

8 years ago

0.0.8-1

8 years ago

0.0.8-0

8 years ago

0.0.7

8 years ago

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4-2

8 years ago

0.0.4-1

8 years ago

0.0.4-0

8 years ago

0.0.3

8 years ago

0.0.3-0

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago