Skip to content

Commit

Permalink
Move ActionTypes to a private export
Browse files Browse the repository at this point in the history
  • Loading branch information
timdorr authored and tomipaul committed Apr 8, 2018
1 parent 49f9521 commit 8f78976
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/combineReducers.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ActionTypes } from './createStore'
import ActionTypes from './utils/actionTypes'
import isPlainObject from 'lodash/isPlainObject'
import warning from './utils/warning'

Expand Down
10 changes: 1 addition & 9 deletions src/createStore.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
import isPlainObject from 'lodash/isPlainObject'
import $$observable from 'symbol-observable'

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

/**
* Creates a Redux store that holds the state tree.
Expand Down
11 changes: 11 additions & 0 deletions src/utils/actionTypes.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/**
* These are private action types reserved by Redux.
* For any unknown actions, you must return the current state.
* If the current state is undefined, you must return the initial state.
* Do not reference these action types directly in your code.
*/
var ActionTypes = {
INIT: '@@redux/INIT'
}

export default ActionTypes
3 changes: 2 additions & 1 deletion test/combineReducers.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable no-console */
import { combineReducers } from '../src'
import createStore, { ActionTypes } from '../src/createStore'
import createStore from '../src/createStore'
import ActionTypes from '../src/utils/actionTypes'

describe('Utils', () => {
describe('combineReducers', () => {
Expand Down

0 comments on commit 8f78976

Please sign in to comment.