@knowmax/genericlist-core
TypeScript icon, indicating that this package has built-in type declarations

4.0.0-beta.22 • Public • Published

Knowmax Generic list with basic CRUD support

Core implementation for Knowmax Generic list with basic CRUD support without any user interface.

Strongly opinionated, but flexible enough to be used in a variety of scenarios.

Features

  • Create, Read, Update, Delete (CRUD) operations
  • Restore functionality for deleted items
  • Filtering, sorting, and pagination support
  • Observable state management with MobX
  • TypeScript support with full type safety
  • Flexible endpoint configuration
  • Error handling for all operations
  • Simple list hook for lightweight read-only scenarios

Hooks

useSimpleList (Recommended for new projects)

A lightweight React hook for fetching paginated list data without complex state management or CRUD operations.

Key Features:

  • Simple pagination support
  • Built-in loading and error states
  • TypeScript support
  • Manual refetch capability
  • Automatic request abortion

Use when:

  • You need read-only data lists
  • You want simple pagination without complex state management
  • You don't need caching functionality
  • You prefer lightweight components

See SIMPLE_LIST_HOOK.md for detailed documentation.

useList (Legacy - will be deprecated)

The original full-featured hook with MobX state management, caching, and CRUD operations.

Note: This hook will be deprecated in future versions. New projects should use useSimpleList for simple scenarios or wait for the upcoming replacement for complex scenarios.

Restore Functionality

The GenericCudList class now includes restore functionality to restore previously deleted items. See RESTORE_FUNCTIONALITY.md for detailed usage instructions.

Readme

Keywords

Package Sidebar

Install

npm i @knowmax/genericlist-core

Weekly Downloads

31

Version

4.0.0-beta.22

License

MIT

Unpacked Size

83.1 kB

Total Files

49

Last publish

Collaborators

  • bas-peeters
  • nynkesimmes
  • peterkuijpers
  • britt-van-gemert