2017-07-02 157 views
0

我试图修改我的react-native应用程序的状态;但是,修改后,我收到以下错误消息。 Error Message无法读取React-Native/VirtualizedSectionList.js中未定义的属性长度

我有堆栈将其跟踪到本机的VirtualizedSectionList中的第230行。我不确定究竟会导致错误。一个潜在的解决方案可能会重置我的反应本地存储,但我无法弄清楚如何做到这一点。这是我目前的redux商店代码。

'use strict'; 
 

 

 
import {applyMiddleware, createStore} from 'redux'; 
 
import thunk from 'redux-thunk'; 
 
import {persistStore, autoRehydrate} from 'redux-persist'; 
 
import {AsyncStorage} from 'react-native'; 
 
import reducers from '../reducers'; 
 

 
const logger = store => next => action => { 
 
\t if(typeof action === 'function') console.log('dispatching a function'); 
 
\t else console.log('dispatching', action); 
 
\t let result = next(action); 
 
\t console.log('next state', store.getState()); 
 
\t return result; 
 
} 
 

 
let middlewares = [ 
 
\t logger, 
 
\t thunk 
 
]; 
 

 
let createAppStore = applyMiddleware(...middlewares)(createStore); 
 

 

 
export default function configureStore(onComplete:()=>void){ 
 
\t const store = autoRehydrate()(createAppStore)(reducers); 
 
\t let opt = { 
 
\t \t storage: AsyncStorage, 
 
\t \t transform: [], 
 
\t \t blacklist: ['nav','util'] 
 
\t }; 
 
\t persistStore(store, opt, onComplete); 
 
\t return store; 
 
}

感谢

回答

0

这似乎并不与储存的问题,我认为这是有你在哪里使用乌尔状态可能会或别的东西,如果你上传的其他代码比我可以检查它,但我不认为这个错误是由于存储。

+0

是的,它最终是如何创建行的错误。感谢您的帮助。 – jaysig

相关问题