Comments (3)
I think there's no need to be able to render tab bar separately from tab screens. The tab bar is kinda like the stack navigator header, it just represents what's in the navigation state and will update if navigation state updates (e.g. you add/remove screens). The underlying libs used for tab navigation already support dynamic tabs, it's just React Navigation which doesn't have an API for it.
Adding a new tab when navigating to it is an interesting idea. However, the problem I see is that this API is imperative. At least in my case, the way I used dynamic tabs is that I get some data from the server and render a list of screens based on that.
With an imperative API, it's probably not very straight-forward, e.g. you navigate to a new screen to add it to the list, but what if you want to remove a screen, how do you correct order, because the data can change, so even if there's an API to remove screens, you'll need to imperatively add/remove screens for ordering which is tedious and will lose state. Sorry if I'm misunderstanding the API :)
from rfcs.
we are talking about this here, right? https://react-navigation.canny.io/feature-requests/p/dynamic-routes-for-navigators
What are the current limitations? Why do we need to define all the screens in advance? I'm looking react-router v4 and they seems to have dynamic routing.
from rfcs.
Closing since dynamic tabs use case is solved by React Navigation 5.
from rfcs.
Related Issues (20)
- Action property that indicates to routes that they should not change index HOT 1
- Improve ergonomics of back HOT 1
- Navigator config to pass params down HOT 1
- Add unsetParams to navigation prop HOT 2
- Reset state action HOT 2
- Expose logic for initializing state of createAppContainer HOT 4
- On will/didFocus subscribe, stop firing the listener if current screen is focused HOT 2
- Idea: Preloading HOT 6
- <StaticNavigator> for tests/storybook HOT 14
- StackActions.popToRouteName(routeName) HOT 2
- Alternative API for defining navigators HOT 12
- how to send navigation events between peer navigators? HOT 4
- Deep linking with authentication
- How to hide tab bar item n react-navigation HOT 3
- Ability to show screens on top of native modals
- useNavigationParams hook HOT 1
- Add useMaterialTabsHeight HOT 1
- Typesafe Stack & Navigation HOT 1
- devTools prop HOT 5
- [RFC] TabView API change
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rfcs.