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

489
Vistas
How to change font size in the app on button click using React native

In my react native application I need to add + and - buttons in settings screen to increase or decrease the font size in the entire app when we click on those buttons from settings screen.Any help would be appreciated.

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

one way to make this is to create a state and update the fontsize on style

example:

const [fontSize, setFontSize] = useState(14);

    return (
      <p style={{fontSize: `${fontSize}px`}}>
         My text
      </p>
      <button onChange={() => setFontSize(fontSize + 1)}>More</button>
      <button onChange={() => setFontSize(fontSize - 1)}>Less</button>
    );

to make this you can set this fontSize at top level.

another way to make this is add any CSS lib and set the same state in a global CSS using the * on css

about 4 years ago · Juan Pablo Isaza 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