Skip to content

awesome-key-factory is a type-safe utility library for managing React Query keys in TypeScript applications. It provides a structured, hierarchical approach to defining query keys with full type safety and autocomplete support.

Why Use This Library?

  • Type Safety: Get compile-time errors for typos and incorrect key usage
  • Autocomplete: Full IDE support with intelligent suggestions
  • Organization: Hierarchical structure keeps your keys organized
  • Flexibility: Support for nested structures, parameters, and array shorthand
  • Maintainability: Centralized key management makes refactoring easier

What Problem Does It Solve?

Managing React Query keys can become messy as your application grows. Without a structured approach, you might end up with:

  • Inconsistent key formats
  • Typos that cause cache misses
  • Difficulty finding where keys are used
  • No type safety

Awesome key factory solves these problems by providing:

  • A centralized, type-safe way to define keys
  • Consistent key generation
  • Full TypeScript support with autocomplete
  • Easy refactoring and maintenance

Released under the MIT License.