Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

181
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!