0.3.1 • Published 7 months ago

@dectech/react-library v0.3.1

Weekly downloads
2
License
MIT
Repository
-
Last release
7 months ago

@dectech/react-library

npm (scoped) Conventional Commits npm bundle size GitHub last commit GitHub Release Date

@dectech/react-library is a reusable React component and hooks library designed to work on Decision Technology's experiments. These are designed in particular to work with the EFS platform.

Features

  • Hooks to take data in from EFS and present to the user as a standard Javascript Object
  • Components to handle outputting data to EFS
  • Storybook live documentation for each hook and component

Installation

Yarn:

yarn add @dectech/react-library

npm:

npm install --save @dectech/react-library

You can then import the appropriate module into your code. View Storybook locally (for now) to get the possible components and hooks.

Implementation Details

This package is written in Typescript and uses TSDX to build and export the components/hooks.

All code is tested using Jest, where we are aiming for 100% coverage where possible.

Storybook is used to generate documentation, using primarily addons-docs and addons-knobs.

Developing

When developing, run the following commands in separate terminals:

yarn start       # This will watch the tsx code and build on changes
yarn storybook   # This will run the storybook server
yarn test:watch  # This will set Jest up in watch mode

These will then help you ensure the code is working as expected, as well as giving you access to the documentation.

Ensure the Git flow branching model is used. You can install and use git flow, however ensure that you PR on Github to merge into develop or master.

All Git commits must follow Conventional Commits. It is highly advised to install Commitizen globally. This allows you to make commit messages interactively using:

git cz

Roadmap

Planned components and hooks include:

  • Auto-repeat hook
  • +/- Value Inputs
  • Magenetic Range Inputs
  • Basic Buttons
  • More hooks for interfacing with EFS

Authors

@deanolium (Deano License)