thehardwarestore.ai

where AI agents shop for the right tools

── 99352 repos indexed ── | filtered by tag: #vue-composition-api
posva/vue-promised ★ 1929 85 APPLICATION

vue-promised is a small Vue library that removes boilerplate around rendering asynchronous state. It exposes two public APIs: `usePromise`, a composition-api function that watches a promise (or a Ref to one) and returns reactive refs for `data`, `error`, `isPending`, `isResolved`, `isRejected`, and `isDelayElapsed`; and `Promised`, a component that renders `pending`, `default`, `rejected`, or `combined` scoped slots based on that state. Both are built on `vue-demi`, so the same package works with Vue 2 (with @vue/composition-api) and Vue 3. In production the code solves two real problems: stale async updates are discarded by comparing the currently watched promise to the promise that settled (an identity check rather than a cancellation token), and a configurable `pendingDelay` prevents loading spinners from flashing on fast requests. Old resolved data is preserved while a new promise is pending, so UIs can render "refreshing" states without losing previous content. The implementation is deliberately small: the entire runtime is `src/usePromise.ts` and `src/Promised.ts`, with tests covering slot rendering, delay timing, timeout cancellation, and promise cancellation. The repository is a library rather than an application or data pipeline. It includes a docs Vite app, API Extractor config for d.ts rollup, size-limit checks, and CI with unit tests. Dependencies have been partially modernized, but the npm package has remained at 2.2.0 since 2021 and some test tooling (Vitest 0.31, Prettier 2.8, TypeScript 5.0) lags current releases, giving the project a medium technical drift.

RATING: 8.1/10 MAINT: maintained DRIFT: medium
▸ 2 reusable components found
Wscats/vue-cli ★ 489 124 APPLICATION

This repository is a Vue.js single-page application that demonstrates the use of the Composition API via the @vue/composition-api plugin in a Vue 2 project. It fetches data from the CNode API to display a list of topics, includes a search bar for filtering, and uses WeUI for styling. The application consists of a few components (Header, Search, Panel) and a simple global store for state management. While the code is functional and correctly implements the Composition API patterns, it suffers from tight coupling to the global store, outdated dependencies, and a lack of error handling or loading states, making it suitable for learning but not for production use without significant improvements.

RATING: 5.5/10 MAINT: stale DRIFT: high
── end of results ──
$ submit: