如何添加订阅以访问本机应用程序中的页面

How to add subscription to access a page in react native application

大家早上好!我想向我的 React Native 应用程序添加一个只能由订阅用户访问的功能。但我不知道该怎么做。此外,这方面的资源有限。任何人都可以告诉我所涉及的步骤,向我发送有关它的任何有用的文章,甚至可以帮我付钱做这件事。非常感谢。

我还没有任何代码,因为我是 React Native 的新手。我的项目需要它。

该项目共有三个页面。 “主页”“付款”“内容”。单击主页中的按钮后,用户将转到付款页面。付款后,用户将访问内容页面。

用户付款后才能访问内容页面。

getItemFromStorage() {AsyncStorage.getItem('paymentDone', (err, result) => { // result is boolean if(result) { that.props.navigation.push('ContentPage'); } else { // not allowed to go to Content } }); }