I installed the CurrencyFormat using "npm install react-currency-format --save --force" But CurrencyFormat is not rendering in my page. By the way, the button after CurrencyFormat is working normaly. Anyone can help me, why CurrencyFormat it isn't rendering?
import React from "react";
import "./Subtotal.css";
import CurrencyFormat from "react-currency-format";
function Subtotal() {
return (
<div className="subtotal">
<CurrencyFormat
renderText={(value) => {
<>
<p>
Subtotal (0 items): <strong>0</strong>
</p>
<small className="subtotal__gift">
<input type="checkbox" />
This order contains a gift
</small>
</>;
}}
decimalScale={2}
value={0}
displayType={"text"}
thousandSeparator={true}
prefix={"$"}
/>
<button>Go to checkout</button>
</div>
);
}
export default Subtotal;