Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

355
Visualizações
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
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda