@zthun/helpful-react
v11.0.0
Published
Helpful library that implements some react hooks and helpers.
Readme
Helpful React
This package provides useful hooks and functions that help with frontend development using React.
Installation
npm install @zthun/helpful-react
yarn add @zthun/helpful-reactFeatures
Import the public exports in these guides from @zthun/helpful-react. Use
import type for type-only exports.
Call hooks from React components or custom hooks.
| Feature | Description | | ------------------------------------------------------ | ------------------------------------------------------------------------------ | | ambassador-state | Support either externally controlled state or local component state. | | async-state | Load asynchronous data and distinguish loading, loaded, and error states. | | file-select | Open a browser file picker through a service and React context. | | keyboard-activate | Create keyboard activation handlers for focusable elements. | | state-as-array | Keep component state in array form while accepting single values or arrays. | | sync-state | Keep editable local state synchronized with changes to an initial value. | | view-state | Load a page and its item count independently from a helpful-query data source. | | window | Access the global object through an overridable React context. |
