Coder Social home page Coder Social logo

Comments (3)

satya164 avatar satya164 commented on May 2, 2024 1

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.

compojoom avatar compojoom commented on May 2, 2024

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.

satya164 avatar satya164 commented on May 2, 2024

Closing since dynamic tabs use case is solved by React Navigation 5.

from rfcs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.