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

353
Views
React: how to make a numbered list out of different components (with different layouts)

Here is the UI of a React app I am working on: application UI

Currently UI is made as a single giant layout.

I want to break each step to be its separate component. As you can see each component would have somewhat different layout. Now I want to make is such that we would get numbering "Step 1:", "Step 2:" algorithmically (currently those are hardcoded strings).

I was thinking about using high-order components for this purpose, but wasn't sure if I would require them to share context or something to get the numeration correct.

Any ideas how such thing could be achieved?

Again, I will provide the layout as a separate component, step caption as a string, but the part Step #: should be added during render.

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!