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

194
Vistas
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 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