我正在使用反应导航并试图找出如何向所有端点添加前缀。跟随我的LinkingConfiguration
这不符合我的要求:
// 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: '*',
},
},
};
我希望所有端点都带有前缀app
, i.e:
app/activityone
app/camera
app/posturl
app/report
但我不喜欢单独更改它们。我怎样才能做到这一点?
在后端,我指向以以下开头的所有网址app/...
到我的反应应用程序。但我无法使用深层链接正确导航,因为我的react-navigation
链接配置不考虑app
prefix.