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

TrustDec/react-native-component-redux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

29ddf74 · Jun 9, 2019

History

93 Commits
Apr 25, 2018
Apr 25, 2018
May 30, 2019
Mar 21, 2018
May 7, 2018
May 7, 2018
Apr 25, 2018
Feb 28, 2018
Apr 13, 2018
Feb 28, 2018
Apr 13, 2018
Apr 25, 2018
Feb 28, 2018
Apr 25, 2018
Apr 25, 2018
Mar 2, 2018
Mar 2, 2018
Apr 26, 2018
Apr 25, 2018
Apr 25, 2018
May 30, 2019
May 30, 2019
May 30, 2019
May 30, 2019

Repository files navigation

功能集合

  • 热更新 code-push
  • carousel
  • redux 案例
  • mobx 案例
  • react-navigation 案例
  • Android 硬更新
  • iOS 硬更新
  • native 混合

项目架构

  • react-native,
  • react-navigation,
  • redux,
  • mobx,
  • react-native-vector-icons
  • react-native-splash-screen
  • react-native-code-push ...

自动化工具

  • prettier

案例效果图

screenshot screenshot screenshot screenshot

快捷地址:

immutable doc

immutable blog

react-navigation doc

React Native Express

react-navigation-redux-helpers doc

react-navigation-redux error

介绍 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 继续前进,你可以阻止它继续前进,或者你可以改变它,并把它发送给下一个。