React Credit Calculator Discount
This package allows you to control interest rate/amount for your calculator from base package with discounts.
Installation
npm i --save react-credit-calculator@^2 react-credit-calculator-discount
Usage
- Put Discount controller after your calculator controller
;;;
If discount will be put into discount controller, your target interest rate/amount will change. You will also able to receive all actual discounts.
2. Use Discount control and Discount button to control specific discounts
;;;
This example shows how to append/remove discount with type "discountType" and rate = 0.5 on button click. Discount will be either appended or removed, depending on whether it is active. You can combine different discount types. You can receive active discounts in Discount controller context consumer.
;;