@use-ui/hooks
TypeScript icon, indicating that this package has built-in type declarations

1.0.40 • Public • Published

Collection of React hooks for building UI, including forms, validation and data fetching. Best used with Push-RPC framework.

Main hooks

useTopic - Async load data from backend.

useActions - Create async actions, with error handling & progress tracking.

useForm - Create async actions, with error handling & progress tracking.

Additional hooks/utils

useCachingTopic - Cache topic data for multiple subscribers.

usePrevious - Hook to use data from the previous render.

oneTimeField - Create a one-time field to be used with input components instead of useForm.

useResult - Access to global results, installed via ResultContext component.

Typical use cases

Simple form

Initial data for the form from topic

Initial data for the form from async effect

One-shot field

Case 1. Generic oneTimeField

Case 2. InlineEdit

Loading data from server

Performing some action

Case 1. Generic useAction

Case 2. Including form

Extra cases

Trim input value after edit

Do some action on form data change

API Reference

/api-docs/README.md

Readme

Keywords

none

Package Sidebar

Install

npm i @use-ui/hooks

Weekly Downloads

79

Version

1.0.40

License

MIT

Unpacked Size

133 kB

Total Files

67

Last publish

Collaborators

  • vasyas