React-native-tab-view: Tutorial on adding tabs dynamically

Created on 16 Feb 2017  路  7Comments  路  Source: satya164/react-native-tab-view

Is there a way to load tabs dynamically?
For example, I call a service and then populate the routes array with every tab I want to show.

Most helpful comment

@spezzino I've never tried that, but it should be possible by just updating the routes array in the state. if it doesn't work properly happy to investigate why and fix it. though what I had done in a previous app was just show a loading spinner without the tabview and then when I get the list, show the tabview with the new set of tabs.

All 7 comments

@spezzino I've never tried that, but it should be possible by just updating the routes array in the state. if it doesn't work properly happy to investigate why and fix it. though what I had done in a previous app was just show a loading spinner without the tabview and then when I get the list, show the tabview with the new set of tabs.

It worked.

In case anyone needs an example, I'll do a PR in a moment to your example project

@spezzino sounds good

Problem seems to have been solved here, closing 馃憤

@spezzino did this tutorial ever happen? looking for dynamic tabs at the moment

an example would be nice, thanks in advance

@satya164 have you uploaded loading dynamic tab example?
@brendandestefano did you find any solution on dynamic tabs thing?
@spezzino after executing it's giving me an error, if you can provide any working example on expo, that would be very great

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nastarfan picture nastarfan  路  3Comments

itzsaga picture itzsaga  路  3Comments

ios-dev-newbie picture ios-dev-newbie  路  3Comments

lubomyr picture lubomyr  路  3Comments

AndriiUhryn picture AndriiUhryn  路  3Comments