react-gadgets
is a React Library which contains a collection of custom reusable React Components, documented with storybook and tested using Jest & React-Testing-Library. The intention is not to re-create the wheel, hence most of the React Component are created using third party libraries and css.
This library was created using the following technology decisions:
- React
- ES6 (javascript syntax)
- Eslint & Prettier
- Rollup (javascript module bundler) & Babel (javascript transcompiler) for bundling the library and publishing to npm.
- Storybook (for documenting & developing/testing UI components in isolation).
- Jest & React-Testing-Library (for testing).
- CSS Modules & SASS (for styling)
Refer to the configuration guide for more details on how to create new library
-
Installing the library
yarn add react-gadgets
- Import the Components
import { Sample } from 'react-gadgets';
import Sample from 'react-gadgets/dist/esm/Sample';
-- direct import
Refer to the documentation for more details.
-
Creating custom react component library
- How to create react component library (typescript + rollup + sass + storybook)
- How to create react component library
- How to set up react component library with rollup
- How to write and build JS libraries in 2018
- Babel + Rollup
- Storybook
- Testing
- Eslint + Prettier
- Styling (CSS)
- Code Splitting
- Publishing to NPM / Checking it out locally
- Scripts
-
Writing Test using React-Testing-Library & Jest
- 8 simple steps to start testing react apps using react-testing-library and jest
- Advanced React components mocks with jest and react-testing-library
- Test Isolation with React
- Understanding Jest Coverage Report
- Understanding Jest Mock
- Bypassing Jest Mock
- Testing Parent and Child seperately
- How to write functional tests with react-testing-library
- Common mistakes with react-testing-library
- react-testing-library cheatsheet
- react-testing-library which query to use when testing
- list of query roles
-
Writing Storybook Documentation
-
Components
- Transfer List
Important Note: This project does not redistribute third party libraries but identifies their availability. The libraries called by this project are subject to their creator licenses. Remember to consult and comply with all licenses in your uses.