trufflesuite / drizzle

Reactive Ethereum dapp UI suite
906 stars 238 forks source link

Change action types in store to constants #70

Closed MalloryLeeWong closed 4 years ago

MalloryLeeWong commented 4 years ago

All of the action types in the Drizzle store that are written as strings can be changed to constants. This could reduce the risk of bugs from typos in action type names, especially given the large number of action types in the store.

The action type constants can also be saved in a more standardized way in separate 'constant.js' files under their respective sub-reducer folder in the store. This could make it easier to find and access the action types by category.

Please see an example of an action type written as a string in the contracts reducer below:

action_type_example