【问题标题】:how can i reload the page after deleting in react nativereact native删除后如何重新加载页面
【发布时间】:2021-10-01 10:01:20
【问题描述】:

这是我拒绝配置文件以删除它们的代码 删除后如何自动重新加载页面?

const canceller = (item) => {
        firebase.firestore()
        .collection("ServiceProvider")
        .doc(item)
        .delete()
        .then(()=>{
           
          
           alert(`you have deleted the profile successfully  `);

【问题讨论】:

标签: firebase react-native google-cloud-firestore


【解决方案1】:

您可以在.then() 方法中调用state 变量来重新加载您的页面。

您也可以使用 firebase 的 onSnapshot() 方法,但这取决于您如何/是否从您的 ServiceProvider 集合中渲染数据。

【讨论】:

    猜你喜欢
    • 2018-05-02
    • 1970-01-01
    • 2018-03-29
    • 1970-01-01
    • 2023-04-02
    • 1970-01-01
    • 1970-01-01
    • 2018-12-02
    • 2022-01-24
    相关资源
    最近更新 更多