2017-05-24 93 views
0

我想要的終極版DevTools Chrome擴展添加到我的終極版商店,這裏所描述:http://extension.remotedev.io/如何將Redux DevTools Extension添加到我的react-redux存儲中?

這裏是我的店:

let store; 

const initStore = ({onRehydrationComplete}) => { 

    store = createStore(
    combineReducers({ 
     ...reactDeviseReducers, 
     form: formReducer, 
     router: routerReducer, 
     apollo: apolloClient.reducer(), 
     cats: catReducer 
    }), 
    {}, 
    compose(
     applyMiddleware(
     thunk, 
     routerMiddleware(history), 
     apolloClient.middleware() 
    ), 
     autoRehydrate() 
    ), 
    window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__() 
); 

    persistStore(store, { 
    blacklist: [ 
     'form' 
    ] 
    }, onRehydrationComplete); 

    return store; 
}; 

Chrome的擴展仍然顯示:「沒有存儲中找到。確保按照說明進行操作。「

任何想法我做錯了什麼?謝謝!

+1

此視頻介紹瞭如何devtool連接到應用程序 - https://youtu.be/TSOVLXQPWgA – Prem

回答

2

devtools需要在你的撰寫。

嘗試:

let store; 

const initStore = ({onRehydrationComplete}) => { 

    store = createStore(
    combineReducers({ 
     ...reactDeviseReducers, 
     form: formReducer, 
     router: routerReducer, 
     apollo: apolloClient.reducer(), 
     cats: catReducer 
    }), 
    {}, 
    compose(
     applyMiddleware(
     thunk, 
     routerMiddleware(history), 
     apolloClient.middleware() 
    ), 
     autoRehydrate(), 
     window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__() 
    ) 
); 

    persistStore(store, { 
    blacklist: [ 
     'form' 
    ] 
    }, onRehydrationComplete); 

    return store; 
}; 
+0

完美...謝謝 – AnApprentice

相關問題