Namespacing Redux Action Type Constant Values

Cliff Hall
ITNEXT
Published in
3 min readJul 26, 2018

--

Write clear action type constants without being overly verbose.

Most everyone agrees that defining constants for your Redux action types is good idea. If you use string literals, it’s all too easy to misspell one and wonder why your reducer isn’t responding. If you use a constant, your IDE can point out that gaffe right away.

Declaring Action Type Constants

The Standard Way

--

--