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

209
Views
React-Typescript - Mapping props with dictionary type

I have been using Typescript with React from a while. I have a scenario where my type definition is similar to this

type Attributes: {
 industries: [];
 regions: [];
 products: [];
 [key: string]: [];
}

The top three props are consistent while the last one can be areaTypes or categories.

Now when I map through these props I can read the data of the top three props as their names are consistent but when I want the value for the dictionary prop I have to give the name of that specific prop in order to read it.

<ul>
  {props.areaTypes.map((item) => (
    <li>{item}</li>
  ))}
</ul>

I want to know if there is any other efficient way to read values of dictionary type, so I don't have to type in the name of the unknown props each time to map it.

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