Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

184
Vistas
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 Respuestas
Responde la pregunta

0

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

about 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda