Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

261
Visualizações
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 Respostas
Responde à pergunta

0

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

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda