aksonov / react-native-redux-router

React Native Router using Redux architecture
BSD 2-Clause "Simplified" License
405 stars 46 forks source link

A bottom bar persists across desired routes #3

Open fselcukcan opened 8 years ago

fselcukcan commented 8 years ago

Is that possible to have a BottomBar that persists (not slides etc. just stays there) across the desired routes?

Rather than naming the bars as Nabbar and Tabbar, I will name them TopBar and Bottombar as Navbar or Tabbar according to their functionality assigned.

TopBars as Navbars can be specific to some route and may change or even not exist in some specific routes (i.e. hides), and that is useful.

  1. Some times a general, common BottomBar is required across some specific or all routes and again may hide in some other routes, as well, like Tabbars do. A TopBar, maybe as a Navbar, will be required to show in some routes again as it can currently do. Is that possible to achieve with react-native-redux-router?
  2. Even some of the routes can contain a secondary bar (Top or Bottom) as a Tabbar in addition to persisting bar (Top or Bottom again) to have desired control over sub-routes of one or more of the top level routes. This actually what I need to achieve.

As I review different modules written for navigation purposes, I cannot see a full fledged module that can achieve these and run both on iOS and Android. react-native-redux-routeris by now is the most complete I have faced with, but this last thing I do not know whether it can achieve or not.

aksonov commented 8 years ago

I was thinking about it a lot but didn't found elegant solution yet...

fselcukcan commented 8 years ago

Is that possible to achieve following by Navigators nested as many as required?

Rather than hiding a bar for some route which currently not supported in a single Navigator, defining such routes in an upper level Navigator, with no or desired bars, that parents the Navigator with that persisted bar, top or bottom, seems possible.

Or even a top-level N that owns several Ns. One N is for normal app with persistent bar if required, and other each for those routes with different tab requirements, one can have topbar as navbar, the other can have topbar as a tabbar custom, or bottom bar as tabbar, or at the end no bar at all. In real use those routes may include, e.g., a login route with no bars, a profile or item route with only a topbar as navbar with back button and title. Those can be linked from the main app's N's routes, by passing each route down the hole.

And I do not know how to implement a router syntax system, but if this mechanism can support what I descrube it for, I know how to implement it with standard react native Navigator way.

This is my solution I think about, what you say?

aksonov commented 8 years ago

Yes, it seems ideal just to support nested "Router" tags. However it is not clear yet how to implement it.

byk04712 commented 8 years ago

Is it contains Tabbar or I will use like Tabbar Component。 how to use it.