简体   繁体   English

从Redux持久存储中获取完整数据

[英]Get complete data from redux persist store

How to Get complete data from redux persist store to take backup of store and store in my drive. 如何从Redux持久存储中获取完整数据以备份存储并将其存储在我的驱动器中。 Kindly help me to get the complete values in my store 请帮助我在商店中获取完整的价值

I have tried by using store.getstate(). 我已经尝试过使用store.getstate()。 Can anyone guide my to get it 谁能指导我得到它

Use subscribe to add a state change listener, and put your logic in it. 使用subscribe添加一个状态更改侦听器,并将您的逻辑放入其中。

store.subscribe(() => {
  var state = store.getState();
  // Your logic
}); 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM