Skip to content

With Redux, your app's state is defined by a reducer. Each navigation router effectively has a reducer, called getStateForAction.

License

Notifications You must be signed in to change notification settings

skylingfly/react-native-component-redux

 
 

快捷地址:

react-navigation doc

React Native Express

react-navigation-redux-helpers doc

介绍 Redux 中间件(Middleware)

还记得Redux的GIF嘛

我们需要稍微改变一下

正如你所看到的,这里还有一个概念:Middleware

什么是Middleware

文档中看到:

    It provides a third-party extension point between dispatching an action, and the moment it reaches the reducer

简而言之,这是一个函数,在Action到达Reducer之前,将使用Action调用该函数。

在这个功能中,你可以让Action继续前进,你可以阻止它继续前进,或者你可以改变它,并把它发送给下一个。

About

With Redux, your app's state is defined by a reducer. Each navigation router effectively has a reducer, called getStateForAction.

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 84.3%
  • Objective-C 9.0%
  • Python 3.5%
  • Java 3.2%