0
我是ReactJS初學者。這怎麼我的店,截至目前如何在簡單的不可變庫中使用redux-form/immutable?
import { createStore, applyMiddleware, compose, combineReducers } from 'redux'
import { routerReducer } from 'react-router-redux'
import { reducer as formReducer } from 'redux-form';
import thunk from 'redux-thunk'
import { reducer as usersDataReducer } from 'data/reducer'
import { reducer as authReducer } from 'scenes/Main/scenes/Auth/reducer'
import { reducer as sessionReducer } from 'services/reducer'
const appReducer = combineReducers({
data: usersDataReducer,
scenes: authReducer,
session: sessionReducer,
routing: routerReducer,
form: formReducer,
})
export default createStore(appReducer, compose(
applyMiddleware(thunk),
window.devToolsExtension ? window.devToolsExtension() : (f) => f
))
我成功地整合redux-form
在我的應用程序創建的。然而,我的應用程序中的所有reducer都使用普通的immutable
庫,所以我想使用redux-form
的不變版本以保持一致性。我不知道,因爲在redux-form
的文檔中,example需要使用redux-immutablejs
庫。它增加了已經複雜的redux-form
的複雜性。我想使用普通的immutable
庫,如果不鼓勵,我需要幫助將redux-form/immutable
+ redux-immutablejs
集成到我當前的設置中。任何幫助,將不勝感激。