Closed crixusshen closed 5 years ago
为了兼容web端已经实现好的功能,当时数据状态的命名规范都是根据来命名的,为了让RN能够复用这些localstorage内的状态,所以命名上必须保持一致,因为RN和WEB的代码都是同一份,但是源代码中很明确的会检查是否key值包含,如果有则直接console.error。我想了解下为什么需要过滤掉这个特殊字符,是存在什么坑吗?
因为key值的分割是用了_符号 但是你数据状态用什么都无所谓啊
为了兼容web端已经实现好的功能,当时数据状态的命名规范都是根据来命名的,为了让RN能够复用这些localstorage内的状态,所以命名上必须保持一致,因为RN和WEB的代码都是同一份,但是源代码中很明确的会检查是否key值包含,如果有则直接console.error。我想了解下为什么需要过滤掉这个特殊字符,是存在什么坑吗?