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

Support symbol action types #129

Closed
wants to merge 1 commit into from
Closed

Conversation

davidmason
Copy link

Symbol action types cause an error as they are not implicitly converted
to strings when trying to concatenate them with another string.
This just wraps the action type in String(...) when it is being printed so
it should work regardless of the typeof the action type constant.

Symbol action types cause an error as they are not implicitly converted
to strings when trying to concatenate them with another string.
This just wraps the action type in String(...) when it is being printed so
it should work regardless of the typeof the action type constant.
@imevro
Copy link
Collaborator

imevro commented Feb 11, 2016

Use actionTransformer

import createLogger from 'redux-logger';

const logger = createLogger({
  actionTransformer: (action) => ({
    ...action,
    type: String(action.type),
  });
});

@imevro imevro closed this Feb 11, 2016
@davidmason
Copy link
Author

Awesome! I should have read more docs!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants