Overview
Bach is a utility library that allows React developers to compose their components in a functional manner. The goal of Bach is to create a codebase that is readable, flexible, testable, and maintainable. The library encourages the use of single-use, small functions that can be easily shared across the codebase. Bach focuses on rendering components, allowing other concerns to be handled elsewhere and passed in.
Features
- Allows developers to compose a series of functional concerns around components
- Provides a simple interface to support the addition of custom enhancers
- Prefer the use of React hooks for implementation
Installation
To install the Bach library, you can follow these steps:
- Open your terminal and navigate to your project directory.
- Run the following command to install Bach:
npm install @truefit/bach
- Once the installation is complete, you can start using Bach in your React components.
Summary
Bach is a utility library for React that enables developers to compose their components in a functional manner. It focuses on creating a codebase that is readable, flexible, testable, and maintainable. The library encourages the use of single-use, small functions that can be easily shared across the codebase. Bach provides a simple interface for adding custom enhancers and prefers the use of React hooks for implementation. Overall, Bach aims to fill the gap left by the deprecation of Recompose and provides a compositional approach to building components in React.