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

273
Vistas
React Bootstrap Tabs- Trying to Control Tab But Failing

I'm trying to use hooks to control a react-bootstrap tab. However I'm not sure how to double it up with Nav and Tab.Content. The official documentation provides instructions on how to do it for normal Tabs but not for what I am trying to do.

As an example, whenever I load up my SPA, the default tabs show nothing. I have to click on Tab 1 or Tab 2 before anything loads.

enter image description here

Here is my card:

              <Card style={{ borderRadius: "0px" }}>
                <TabContainer>
                  <Card.Header>
                    <Nav variant="pills">
                      <Nav.Item>
                        <Nav.Link eventKey="first">
                          <div>Tab 1</div>
                        </Nav.Link>
                      </Nav.Item>
                      <Nav.Item>
                        <Nav.Link eventKey="second">Tab 2</Nav.Link>
                      </Nav.Item>
                    </Nav>
                  </Card.Header>
                  <Card.Body>
                      <Tab.Content>
                        <Tab.Pane eventKey="first">FIRST</Tab.Pane>
                        <Tab.Pane eventKey="second">SECOND</Tab.Pane>
                      </Tab.Content>
                  </Card.Body>
                </TabContainer>
              </Card>

How do I use const [value,setValue] = useState('Tab 1') to work with this?

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