I'm trying to understand the working of Redux functions, I'm able to understand how we create the Redux store and apply middleware.
While creating Redux store, we pass the rootReducers, preloadedState, storeEnhancer.
But in this code, I'm not able to understand how the resultant enhancer from compose function is given as input to the createStore function.
import thunk from 'redux-thunk'
import rootReducers from './reducers'
let finalCreateStore = compose(
applyMiddleware(thunk),
window.devToolsExtension ? window.devToolsExtension() : f => f
)(createStore)
export default function configureStore(initialState) {
return finalCreateStore(rootReducers, initialState)
}