vue-recomputed-async
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "vue-recomputed-async", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "Vue.js extended computed composable with async, initial state & manual refresh support", | ||
@@ -5,0 +5,0 @@ "author": "Ahmed Chakhoum", |
@@ -5,2 +5,15 @@ # vue-recomputed-async | ||
Vue.js extended computed composable with async, initial state & manual refresh support | ||
this library aims to provide better code integration by providing a single function that eliminate the need to create and call a fetch function, creating a sperate loading & data objects manually handling the fetch function errors, lazy evualation, providing an initial default state in case of in progress evaluation or failure | ||
### Comparison with regular `computed()` & `vueuse` `computedAsync()`: | ||
|Feature|`computed()`|`computedAsync()`|`recomputedAsync()`| | ||
|-|-|-|-| | ||
|Dependency Tracking & Reactivity|✅|✅|✅| | ||
|Async Support|❌|✅|✅| | ||
|Initial State|❌|✅|✅| | ||
|Lazy Evaluation|❌|✅|✅| | ||
|Evaulation State|❌|✅|✅| | ||
|Manual Re-evaluation|❌|❌|✅| | ||
#### Use cases: | ||
- providing initial data state, while fetching data from API | ||
- ability to refresh the data that might be changed without being tied to any dependecy a normal computed would not be able to react to | ||
# Install | ||
@@ -7,0 +20,0 @@ ```bash |
6903
56