2016-04-27 49 views
0

我使用reduxredux devtool 我剛剛嘗試過REDX形式:偉大的工作和有趣的使用!不過,我想我每次修改fied時,應用程序狀態都會改變。 redux devtool將每個新密鑰保存在一個字段中。它減緩了現場刷新了很多!REDUX開發工具與REDX形式

這裏是了Redux devtool固定面板,顯示我的應用程序狀態的變化: enter image description here

這是我如何鏈接終極版,devtool到我的應用程序商店:

const createStoreWithMiddleware = (() => { 

    //DEv too only available in development 
    if (__DEV__ && window && window.location) { 

    return compose(
     applyMiddleware(thunk), 
     devTools.instrument(), 
     persistState(
     window.location.href.match(/[?&]debug_session=([^&]+)\b/) 
    ) 
    )(createStore); 
    } else { 
    return compose(
     applyMiddleware(thunk) 
    )(createStore); 
    } 
})(); 


function configureStore(initialState) { 
    const store = createStoreWithMiddleware(rootReducer, initialState); 

    if (module.hot) { 
    // Enable Webpack hot module replacement for reducers 
    module.hot.accept("./reducers",() => { 
     const nextReducer = require("./reducers"); 
     store.replaceReducer(nextReducer); 
    }); 
    } 
    return store; 
} 

var appStore = configureStore(); 
export default appStore; 

我想找到有一種方法可以避免使用redux開發工具來獲取redux-form更改。任何更好的解決方案將受到歡迎:)

回答

0

我認爲redux-devtools-filter-actions是您尋求的長生不老藥。有人建議在this thread抱怨redux-form冗長。

+0

謝謝,我會盡快給它一個嘗試,並讓你知道它是否有效。非常感謝! –

0

你可以在你的瀏覽器中選擇redux devtools擴展,並且有一個字段,你可以在其中指定應該忽略的動作。鍵入'redux-form/CHANGE'它應該工作。