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

224
Views
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
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!