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

232
Visualizações
How to prevent re-render when switch between tabs in react.js

I have a project which has dynamic tabs like Google Chrome. When you click a page on the side menu, then it opens in another tab. Anyway, when I switch between tabs and back to the previous tab I see all values in inputs are cleared. I want to prevent re-render after I open the tab one time unless I click the buttons. If I get/add some values in a page and switch between tabs. Then I want to see all these values again when I go back to the first page. I'm using react-awesome-tabs library.

My Tabs code;

<Tabs
      active={this.state.activeTab}
      onTabSwitch={this.handleTabSwitch.bind(this)}
      //onTabPositionChange={ this.handleTabPositionChange.bind(this) }
      onTabClose={this.handleTabClose.bind(this)}
      onTabAdd={this.handleTabAdd.bind(this)}
      draggable={true}
      showAdd={true}
    >
      {
        this.tabs.map((value, index) => {
          return (
            <Tab
              key={index}
              title={value.title}
              showClose={true}

            >
              {this.state.activePageisNull ? this.state.initialPage : this.state.activePage}
            </Tab>
          );
        })
      }
    </Tabs>

And my screen page;

enter image description here

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