The navigation-compose new typed route feature is cool 🆒😎. However, I found the API is not friendly for
dinamyc
routing. By dynamic I mean, I don't know the number and the types of my routes upfront the App starts. It will be provided from an
app-config.json
file at build time or from Firebase configuration, launchdarkly etc.
How are others dealing with dynamic routes setup?
s
Stylianos Gakis
05/27/2024, 11:45 PM
Have them all there, and dynamically not use some of them if that version of the app doesn't want to.
👍 1
i
Ian Lake
05/28/2024, 3:10 AM
Keep in mind that the graph is meant to be all possible routes - whether you actually use them all as part of your business logic (choosing a v1 route vs v2 route based on an A/B test) is up to you
👍 1
Ian Lake
05/28/2024, 3:11 AM
But yes, the reason the string route APIs aren't deprecated is because they are still exactly what you need for a runtime, server side generated navigation graph if you really want to go down that direction - in that world, everything is runtime anyways
💯 2
☝🏻 1
☝️ 1
p
Pablichjenkov
05/28/2024, 4:09 AM
Ah great, I kinda guessed that was the API approach but wanted some community confirmation.
I am pretty glad to hear the String routes API remains untouched 🙏👍