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
Dynamic React-Native Tab Creation

I want to create tabs dynamically in react-native, below is the code but I'm getting

Uncaught Error: Couldn't find any screens for the navigator. Have you defined any screens as its children?

import React from 'react';
import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs';
import ChildScreen from './ChildScreen';

const Tab = createMaterialTopTabNavigator();

const CreateTabs = (props) => {
    const { tabData } = props;
    
    return (

            <Tab.Navigator>
                {tabData.map((val, id) => 
                    <Tab.Screen
                        name={`Screen${id}`} key={id}
                        children={(props) => <ChildScreen {...props} data={val}/>}
                        options={{
                            tabBarLabel: `(${val.name})`
                        }}
                    />

                )}
            </Tab.Navigator>
    )
}
export default CreateTabs;


I'm using "@react-navigation/material-top-tabs": "^5.3.14" version of material-top-tabs

Is it possible to create tabs dynamically? Please suggest or provide a snack link with an example, I'm not able to get any solution to make it dynamic.

about 4 years ago · Santiago Trujillo
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