I'm using react-navigation
and trying to figure out how to add a prefix to all endpoints. Follows my LinkingConfiguration
which doesn't do what I want:
// const prefixes = [Linking.makeUrl('/app')];
const prefixes = ['example://app/', 'https://example.com/app/'];
const RootLinkingConfiguration = {
prefixes,
config: {
screens: {
Root: {
screens: {
Activity: {
screens: {
TabOneScreen: 'activityone',
},
},
NewNfe: {
screens: {
Camera: 'camera',
PostURL: 'posturl',
},
},
Report: {
screens: {
ReportScreen: 'report',
},
},
},
},
NotFound: '*',
},
},
};
I would like all endpoints to be prefixed by app
, i.e:
app/activityone
app/camera
app/posturl
app/report
But I wouldn't like having to change them individually. How can I do this?
On the backend side I am pointing all urls starting with app/...
to my react app. But I can't navigate properly with deep-links because my react-navigation
linking configuration does not contemplate the app
prefix.