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

181
Visualizações
how to display ascii value for button component text in react js

I have been trying to display ascii tick symbol for my button text but can't seem to get it to work properly it just shows the string &#10004 within the button anyone know how to fix this is it something to do with my button props?

Here are my two components:

Item:

  import logo from './logo.svg';
    import './App.css';
    import { Button } from './Button';
    
    import React, { useState } from 'react';
    
    const Item = () => {
        const [item, setItem] = useState("");
        
      return (
          
        <div className="Item">
        
          <input 
              type="text"
              value={item}
              label="Enter item scheduled"
              onChange={(evt) => {
                  setItem(evt.target.value);
              }}
          />
          <Button className="CompleteButton" text="&#10004"/>
          
        <h3>Your item scheduled is: {item}</h3>
        
      </div>
        
      );
    }
    
    export {Item};

Button:

import React from 'react';

const Button = (props) => {
    return (
        <button className={props.className} onClick={props.onClick}>{props.text}</button>
    )
}


export {Button}
about 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

I believe you can just paste the tick into the code (✓).

about 4 years ago · Santiago Trujillo 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