UNPKG

569 BJavaScriptView Raw
1/**
2 * These are private action types reserved by Redux.
3 * For any unknown actions, you must return the current state.
4 * If the current state is undefined, you must return the initial state.
5 * Do not reference these action types directly in your code.
6 */
7
8const randomString = () =>
9 Math.random().toString(36).substring(7).split('').join('.')
10
11const ActionTypes = {
12 INIT: `@@redux/INIT${randomString()}`,
13 REPLACE: `@@redux/REPLACE${randomString()}`,
14 PROBE_UNKNOWN_ACTION: () => `@@redux/PROBE_UNKNOWN_ACTION${randomString()}`,
15}
16
17export default ActionTypes