Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

225
Vistas
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 la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda