私はストレートReduxのドキュメントからこれを撮影した:Reduxミドルウェア、サンクス?
const logger = store => next => action => {
console.group(action.type)
console.info('dispatching', action)
let result = next(action)
console.log('next state', store.getState())
console.groupEnd(action.type)
return result
}
は今、私は約束を使用する方法を知っているが、サンクは...私は少し迷ってしまいました。
なぜ彼らは次のことをしますか:store => next => action =>
? Reduxのドキュメントで
パーフェクト!あなたは多くのことをクリアしました! –
あなたは大歓迎です:) –