Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move ActionTypes to a private export #1343

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
11 changes: 1 addition & 10 deletions src/createStore.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,5 @@
import isPlainObject from 'lodash/isPlainObject'

/**
* 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 var 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 @@
import expect from 'expect'
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