@abcnews/tiny-ducks
v1.0.1
Published
`tiny-ducks` is a small redux-style state management module for React.
Downloads
8
Keywords
Readme
Tiny Ducks
tiny-ducks
is a small redux-style state management module for React.
Usage
For usage examples see the example.
Development
This module uses tsdx
for development and packaging.
Get started in the root folder. This builds to /dist
and runs the project in watch mode so any edits you save inside src
causes a rebuild to /dist
.
npm i
npm start
Then run the example inside another terminal:
cd example
npm i
npm start
To do a one-off build, use npm run build
.
To run tests, use npm test
.
Configuration
Code quality is set up for you with prettier
, husky
, and lint-staged
. Adjust the respective fields in package.json
accordingly.
Jest
Jest tests are set up to run with npm test
. This runs the test watcher (Jest) in an interactive mode. By default, runs tests related to files changed since the last commit.
Rollup
TSDX uses Rollup v1.x as a bundler and generates multiple rollup configs for various module formats and build settings. See Optimizations for details.
TypeScript
tsconfig.json
is set up to interpret dom
and esnext
types, as well as react
for jsx
. Adjust according to your needs.