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

184
Views
How to track index and update handle Change for React Native (Native-Base Tabs)

I am using a class component so I can not use the use const [index, setIndex] = React.useState(0); I am trying to use state & setState in order to track index and handleChange (clicking a different tab.

this.state = {
index: 0,
}
handleChange(newValue) {
    this.setState({
      index: newValue,
    });
  }
<Tab
        value={index}
        onChange={this.handleChange}
        indicatorStyle={{
          backgroundColor: 'white',
          height: 5,
        }}
        variant="primary">
        <Tab.Item
          title="Blockchain"
          titleStyle={{fontSize: 12, fontWeight: 'bold'}}
        />
        <Tab.Item title="NFT" titleStyle={{fontSize: 12, fontWeight: 'bold'}} />
        <Tab.Item
          title="Gaming"
          titleStyle={{fontSize: 12, fontWeight: 'bold'}}
        />
      </Tab>
      <TabView value={index} onChange={this.handleChange}>
        <TabView.Item style={{width: '100%'}}>
          <Text h1>Blockchain</Text>
        </TabView.Item>
        <TabView.Item style={{width: '100%'}}>
          <Text h1>NFTs</Text>
        </TabView.Item>
        <TabView.Item style={{width: '100%'}}>
          <Text h1>NFTs</Text>
        </TabView.Item>
      </TabView>
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!