Redux中间件中dispatch和next之间有什么区别?
export default function sampleMiddleware(store) {
return next => action => {
store.dispatch(action)
next(action)
}
}Run Code Online (Sandbox Code Playgroud)
React Native文档(https://facebook.github.io/react-native/docs/asyncstorage.html)说:
建议您在AsyncStorage之上使用抽象而不是AsyncStorage直接用于除了轻量级用途以外的任何抽象,因为它全局运行.
我不明白为什么它建议我写一个抽象只是因为它在全球运作.
将它用于轻物品是有道理的,但为什么全球经营都是坏事呢?