mirror of
https://github.com/zhigang1992/react-navigation.git
synced 2026-02-12 09:21:09 +08:00
53 lines
808 B
JavaScript
53 lines
808 B
JavaScript
const POP = 'Navigation/POP';
|
|
const POP_TO_TOP = 'Navigation/POP_TO_TOP';
|
|
const PUSH = 'Navigation/PUSH';
|
|
const RESET = 'Navigation/RESET';
|
|
const REPLACE = 'Navigation/REPLACE';
|
|
const COMPLETE_TRANSITION = 'Navigation/COMPLETE_TRANSITION';
|
|
|
|
const pop = payload => ({
|
|
type: POP,
|
|
...payload,
|
|
});
|
|
|
|
const popToTop = payload => ({
|
|
type: POP_TO_TOP,
|
|
...payload,
|
|
});
|
|
|
|
const push = payload => ({
|
|
type: PUSH,
|
|
...payload,
|
|
});
|
|
|
|
const reset = payload => ({
|
|
type: RESET,
|
|
...payload,
|
|
});
|
|
|
|
const replace = payload => ({
|
|
type: REPLACE,
|
|
...payload,
|
|
});
|
|
|
|
const completeTransition = payload => ({
|
|
type: COMPLETE_TRANSITION,
|
|
...payload,
|
|
});
|
|
|
|
export default {
|
|
POP,
|
|
POP_TO_TOP,
|
|
PUSH,
|
|
RESET,
|
|
REPLACE,
|
|
COMPLETE_TRANSITION,
|
|
|
|
pop,
|
|
popToTop,
|
|
push,
|
|
reset,
|
|
replace,
|
|
completeTransition,
|
|
};
|