In the Redux guide, it is suggested to define strings constants for Redux action types:
const FOO = 'FOO';
const BAR = 'BAR';
dispatch({ type: FOO });
It's worth noting that most concerns raised are relevant to untyped JavaScript, and constants may be unnecessary in a statically typed application:
type actionTypes = 'FOO' |
'BAR';
dispatch<actionTypes>({ type: 'FOO' });
dispatch<actionTypes>({ type: 'BAZ' }); // type error
Are there specific drawbacks to not using constants as shown above?
This question pertains to both TypeScript and Flow, as they appear to have similarities in this aspect.