Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 1.3 KB

README.md

File metadata and controls

50 lines (36 loc) · 1.3 KB

transmish

React Utility Library

Motivation

transmish is a collection of components, hooks, and functions for supporting front-end development in React. These are meant to be simple and reusable abstractions over tasks that React developers do on a regular basis.

transmish is not a component library in the sense of Bootstrap or Material. Its components are almost entirely lacking in CSS, but rather focus on common behaviors in UIs. transmish also provides hooks, types and constants for a variety of common UI use cases.

Installation

Run npm install transmish or yarn add transmish.

Usage

import { useEffectOnMount, Hideable, useIntersectionObserver } from "transmish";

Components

  • Hideable
  • ScrollOnStateChange
  • ScrollToTop

Hooks

  • useAsyncEffect
  • useEffectOnMount
  • useIntersectionObserver
  • useInterval
  • useBooleanState

Development

  1. Install all dependencies with yarn install.
  2. Run yarn build to check types and compile the code to JavaScript and *.d.ts files.
  3. Run tests with yarn test. To generate a coverage report run yarn test --coverage. Code in this repo should have close to 100% coverage.
  4. View documentation by running yarn storybook from the project root. The Storybook documentation should open in a new browser window.