gpt4 book ai didi

react native 异步存储 : What exactly does 'clear()' function clear?

转载 作者:行者123 更新时间:2023-12-05 06:29:47 25 4
gpt4 key购买 nike

official docs关于 .clear() 我不是很清楚。他们说:

Erases all AsyncStorage for all clients, libraries, etc. You probably don't want to call this; use removeItem or multiRemove to clear only your app's keys. Returns a Promise object.

谁能解释一下,“所有客户”在这种情况下的确切含义是什么?对我来说,听起来其他 RN-Apps 商店也可能受到影响,我无法想象这甚至是可能的。

最佳答案

这意味着应用程序存储在异步存储中的所有内容都将被清除,是的,它不仅包括您的应用程序,还包括其他应用程序,从文档的这一行可以清楚地看出

Erases all AsyncStorage for all clients, libraries, etc. You probably don't want to call this use removeItem or multiRemove to clear only your app's keys.

关于 react native 异步存储 : What exactly does 'clear()' function clear?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53204859/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com