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
Non-string action types are reported <UNDEFINED>
#459
Comments
Use const store = Redux.createStore(reducer, window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__({
serialize: true
})); See API docs for more details. I actually was trying to do the way you suggested in |
I also have this problem.How to fix it? |
IMO you should probably use strings for action types versus something like symbols. My understanding is that strings are serializable, but Symbols are not. The Redux docs specify this; I don’t think there’s an advantage to using Symbols over strings for action types. |
I recently had this problem and fixed it using the const store = createStore(
rootReducer,
window.__REDUX_DEVTOOLS_EXTENSION__ &&
window.__REDUX_DEVTOOLS_EXTENSION__({
actionSanitizer: action => ({
...action,
type: action.type.toString()
})
})
); |
It was a regression in |
You can use anything as an action type, but it seems like only strings are logged properly.
For example if you have
LOAD_USER = Symbol('load user');
and thendispatch({ type: LOAD_USER })
, it will log the action as<UNDEFINED>
.The action type should be logged as
String(action.type)
.The text was updated successfully, but these errors were encountered: