2016-04-27 78 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'它应该工作。