Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

259
Views
react-currency-format is not displaying some of the html elements

I am developing a amazon clone by watching a tutorial. I have created a subtotal component where is used imported and used react-currency-format. inside the currency format tag I have created a arrow function and added some html tags. this html tags are not displaying on the browser. The code snippet written in the Subtotal.js component

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 gifts
                </small>
            </>
        )}
        decimalScale={2}
        value={0}
        displayType={"Text"}
        thousandSeparator = {true}
        prefix={"$"}
    /> 
         
        <button>Proceed to checkout</button>
    </div>
  )
}

the text inside the paragraph tag is not displaying on the browser. but 0 written inside the paragraph tag is displayed inside the input tag.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Try changing "Text" to "text" (lowercase) at the CurrencyFormat displayType prop.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!