Skip to content

Commit b62248b

Browse files
committed
Move ActionTypes to a private export
1 parent 12666b9 commit b62248b

File tree

4 files changed

+15
-11
lines changed

4 files changed

+15
-11
lines changed

src/combineReducers.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { ActionTypes } from './createStore'
1+
import ActionTypes from './utils/actionTypes'
22
import isPlainObject from 'lodash/isPlainObject'
33
import warning from './utils/warning'
44

src/createStore.js

+1-9
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,7 @@
11
import isPlainObject from 'lodash/isPlainObject'
22
import $$observable from 'symbol-observable'
33

4-
/**
5-
* These are private action types reserved by Redux.
6-
* For any unknown actions, you must return the current state.
7-
* If the current state is undefined, you must return the initial state.
8-
* Do not reference these action types directly in your code.
9-
*/
10-
export const ActionTypes = {
11-
INIT: '@@redux/INIT'
12-
}
4+
import ActionTypes from './utils/actionTypes'
135

146
/**
157
* Creates a Redux store that holds the state tree.

src/utils/actionTypes.js

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
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+
var ActionTypes = {
8+
INIT: '@@redux/INIT'
9+
}
10+
11+
export default ActionTypes

test/combineReducers.spec.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/* eslint-disable no-console */
22
import { combineReducers } from '../src'
3-
import createStore, { ActionTypes } from '../src/createStore'
3+
import createStore from '../src/createStore'
4+
import ActionTypes from '../src/utils/actionTypes'
45

56
describe('Utils', () => {
67
describe('combineReducers', () => {

0 commit comments

Comments
 (0)