Skip to content

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

Development

Successfully merging this pull request may close these issues.

2 participants