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

183
Visualizações
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
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