Most everyone agrees that defining constants for your Redux action types is a 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.
Here’s an example from the Redux documentation:
from DZone.com Feed https://ift.tt/2LLdHDX
No comments:
Post a Comment