by lhnz · 10y ago · 0 comments
Regardless of serialization/replay-ability, the core of the suggestion is to `import` some constant instead of using raw strings. Symbols have the benefit of forcing an import, whereas a list of constants that reference strings can be "bypassed" by writing the correct string in a random file. In fact, the redux actions documentation uses the following example of this pattern as the first example.
``` // fileA const ADD_TODO = 'ADD_TODO'
//fileB { type: ADD_TODO, text: 'Build my first Redux app' } ```