@vebgen/simple-crud
TypeScript icon, indicating that this package has built-in type declarations

0.0.10 • Public • Published

simple-crud

The library provides the user with a React hook (useCrud) for managing a list. The list supports viewing, editing, adding, and deleting items.

This implementation is suitable if the list is not large (it does not support pagination) and the items that are retrieved when fetching the list include all properties (no additional fetch is required for editing and viewing).

The useCrud hook delegates the retrieval of the items to another hook that it receives as a parameter. This allows the user to implement the retrieval of the items in a way that is suitable for their use case. The useAPI hook in the @vebgen/use-api package is a good candidate for this.

To use this library in your project, install it using your favorite package manager:

npm install @vebgen/simple-crud
pnpm install @vebgen/simple-crud
yarn add @vebgen/simple-crud

Development

The library is hosted in a monorepo and uses Nx for development.

Running unit tests

Run nx test simple-crud to execute the unit tests via Jest.

Package Sidebar

Install

npm i @vebgen/simple-crud

Weekly Downloads

3

Version

0.0.10

License

MIT

Unpacked Size

37.8 kB

Total Files

15

Last publish

Collaborators

  • tnick