Skip to content

Commit 6905e8f

Browse files
committed
Allow symbols to be actionTypes. So you can have export const MY_ACTION = Symbol()
1 parent 9580806 commit 6905e8f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/createDispatcher.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export default function createDispatcher() {
6363
// Reassign the current state on each dispatch
6464
function dispatch(action) {
6565
invariant(
66-
typeof action.type === 'string',
66+
typeof action.type === 'string' || typeof action.type === 'symbol',
6767
'Action type must be a string.'
6868
);
6969

0 commit comments

Comments
 (0)