You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 11, 2018. It is now read-only.
I know in HomeView, two components are exported for the sake of unit testing. But you still can take advantage of ES7 decorators which IMHO will get us to a cleaner code on the long run in more complicated scenarios.
Hmmmm, it used to use the decorator syntax up until I switched the exports up to export both the smart and dumb versions. The official Redux example uses the former (non-decorated) syntax, which is why I opted for it. I can see where you're coming from, as decorators are definitely the way to go, but I'm not entirely convinced it's that much cleaner in this scenario.
Thanks for the suggestion, I'll give it some thought. In the meantime, if you have any other compelling reasons for using the decorator syntax it's totally open for discussion.
I know in HomeView, two components are exported for the sake of unit testing. But you still can take advantage of ES7 decorators which IMHO will get us to a cleaner code on the long run in more complicated scenarios.
So instead of
create another class within the same file that inherits from HomeView but implements connect as a decorator. i.e.
As export default is used anyway we won't have an issue with importing the connected one from the file
The text was updated successfully, but these errors were encountered: