问题描述
我网站的网址可能是custom.mywebsite.com或custom2.mywebsite.com。 如何在React Native for Web应用程序中获取包含“ custom.mywebsite.com”的当前页面的完整URL?
解决方法
使用Expo Linking,您可以通过调用以下应用程序来获取完整的URL
Linking.getInitialURL().then((url) => {
console.log(url);
});
我网站的网址可能是custom.mywebsite.com或custom2.mywebsite.com。 如何在React Native for Web应用程序中获取包含“ custom.mywebsite.com”的当前页面的完整URL?
使用Expo Linking,您可以通过调用以下应用程序来获取完整的URL
Linking.getInitialURL().then((url) => {
console.log(url);
});