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

182
Vistas
How can i export as multiple words in reactJS?

I have the following code:

import * as apple from './Apple.json';
import * as orange from "./Orange.json";
import * as pear from "./Pear.json";

export default {
  Apple,
  Orange,
  Pear
  }

I am using the entries inside of 'export default' to create Hyperlinks on a new page, However, i would like to export as 2 words for each line.

export default {
  Blue Apple,
  Red Orange,
  Black Pear
  }

The problem is, this breaks my application and the project won't start. I have tried to add "" eg. "Blue Apple". But this will not work.

How can i achieve this?

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

0

Would something like this solve your issue?

export default {
  'Blue Apple': 'Blue Apple',
  'Red Orange': 'Red Orange',
  'Black Pear': 'Black Pear'
 }

Or just export an array of the string values

export default ['Blue Apple', 'Red Orange', 'Black Pear']
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