1.0.2 • Published 10 months ago
aigbojie-discount v1.0.2
aigbojie-discount is a package that helps to calculate discount of price by and it is easy to use.
installation
using npm :
npm i aigbojie-discount
usage in reactjs
it takes two arguements the first is the PRICE and the second is the PERCENTAGE DISCOUNT
import {useDiscount} from "aigbojie-discount";
export default function App(){
const price=300
const percentage_discount=20
const discount=useDiscount(price,percentage_discount);
console.log(discount)
return(
<div>{discount}</div>
)
}