https://github.com/vasyas/use-ui-hooks
Collection of React hooks for building UI, including forms, validation and data fetching
https://github.com/vasyas/use-ui-hooks
Last synced: 3 months ago
JSON representation
Collection of React hooks for building UI, including forms, validation and data fetching
- Host: GitHub
- URL: https://github.com/vasyas/use-ui-hooks
- Owner: vasyas
- Created: 2020-02-25T19:31:13.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-12-18T16:13:02.000Z (6 months ago)
- Last Synced: 2025-02-19T15:46:59.349Z (3 months ago)
- Language: TypeScript
- Size: 265 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Collection of React hooks for building UI, including forms, validation and data fetching.
Best used with [Push-RPC](https://github.com/vasyas/push-rpc) framework.## Main hooks
[useTopic](./api-docs/README.md#usetopic) - Async load data from backend.
[useActions](./api-docs/README.md#useactions) - Create async actions, with error handling & progress tracking.
[useForm](./api-docs/README.md#useform) - Create async actions, with error handling & progress tracking.
## Additional hooks/utils
[useCachingTopic](./api-docs/README.md#usecachingtopic) - Cache topic data for multiple subscribers.
[usePrevious](./api-docs/README.md#useprevious) - Hook to use data from the previous render.
[oneTimeField](./api-docs/README.md#onetimefield) - Create a one-time field to be used with input components instead of useForm.
[useResult](./api-docs/README.md#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](/api-docs/README.md)