unctx: Composition API Utilities
JSON →Unctx is a lightweight JavaScript library that implements the Composition API pattern, popularized by Vue.js, in vanilla JS. It empowers developers to structure complex logic into reusable functions and manage context-like state within their libraries and applications. The current stable version is 2.5.0, with consistent releases indicating active development. A key differentiator is its robust handling of asynchronous contexts, offering support for Node.js's native `AsyncLocalStorage` for persistence across async operations, alongside a build-time transformation for environments lacking native support. It also features a global namespacing mechanism via `globalThis` to mitigate context conflicts across multiple library instances or versions, emphasizing unique and verbose keys for stability.
Traffic · last 30 days ↓25% vs prev 7d
top countries 🇺🇸 United States · 🇨🇦 Canada · 🇩🇪 Germany · 🇫🇷 France