forked from aksonov/react-native-router-flux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
normalize action name with prefix and expose it from module
This is a follow up of aksonov#843 which has been reverted (aksonov#899) since it breaks existig apps as aksonov#894 described. change description: * all actions now defined in a separate file: `ActionConst.js`. * create an mapping object called: `ActionMap` in `Actions.js`, it maps deprecated string literal actions to constant one. router: * will dispatch constant actions if we have dispatch method in props * will pass unmodified type into onNavigate. reducer: * always use ActionConst and ActionMap to determine whether an action type matched or not know issue: it's really hard to not break ANY existing app. especially for those who: 1. stores routing status outside from RNRF 2. use custom reducer instead of RNRF default reducer should be always use action constant from RNRF. it will NOT break if user uses RNRF default reducer.
- Loading branch information
Showing
6 changed files
with
91 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export const JUMP = 'REACT_NATIVE_ROUTER_FLUX_JUMP'; | ||
export const PUSH = 'REACT_NATIVE_ROUTER_FLUX_PUSH'; | ||
export const REPLACE = 'REACT_NATIVE_ROUTER_FLUX_REPLACE'; | ||
export const BACK = 'REACT_NATIVE_ROUTER_FLUX_BACK'; | ||
export const BACK_ACTION = 'REACT_NATIVE_ROUTER_FLUX_BACK_ACTION'; | ||
export const POP_TO = 'REACT_NATIVE_ROUTER_FLUX_POP_TO'; | ||
export const REFRESH = 'REACT_NATIVE_ROUTER_FLUX_REFRESH'; | ||
export const RESET = 'REACT_NATIVE_ROUTER_FLUX_RESET'; | ||
export const FOCUS = 'REACT_NATIVE_ROUTER_FLUX_FOCUS'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.