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

193
Views
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
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!