redux-utilities/redux-actions

Should print warning message if type is undefined

Open

#86 建立於 2016年5月6日

在 GitHub 查看
 (7 留言) (1 反應) (1 負責人)JavaScript (6,540 star) (340 fork)batch import
help wanted

描述

Consider this code, it's commonly used in my project:

import * as actionTypes from './actionTypes.js'
export default handleActions({
  [actionTypes.ACT_1]: (state, action) => {},
  [actionTypes.ACT_2]: (state, action) => {},
})

If there's a typo in actionTypes variable(ACE_1 for instance), there's no warning, linters can't tell the error too. But it's easy to print warning message using redux-actions.

I'd like to send a PR if it's okay to you.

貢獻者指南