引入react-use-database:客户端关系数据变得更加容易

by Austin Malerba

奥斯汀·马勒巴(Austin Malerba)

引入react-use-database:客户端关系数据变得更加容易 (Introducing react-use-database: client-side relational data just got easier)

An issue that’s plagued React apps everywhere: after updating a resource on the server, how do I update my UI state to reflect the changes?

一个到处都困扰着React应用的问题:更新服务器上的资源后,如何更新我的UI状态以反映更改?

Typically there are two solutions:

通常有两种解决方案:

  1. Use the app’s existing data-fetching mechanisms to reload the data (essentially refresh the page on the user’s behalf)

    使用应用程序现有的数据获取机制来重新加载数据(实质上代表用户刷新页面)

翻译自: https://www.freecodecamp.org/news/introducing-react-use-database-client-side-relational-data-just-got-easier-d272c9465bf0/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值