Re:Responsible JavaScript: Part I
by parthdesai on Monday April 15, 2019 @10:35AM
(#19665608)
Use container for the business logic and the component itself just for the view logic. So for example you would have <ToDoContainer /> for the business logic and <ToDoComponent /> for the view logic. Do i get the job? :P
[ Parent
| on HN ]
That's just as shit. You need to build an API layer and a service/utility layer. These should be completely separated from React-land. Ideally you should be able to change UI frameworks without altering or moving any of your business logic.
Re:Responsible JavaScript: Part I
by parthdesai on Monday April 15, 2019 @11:05AM
(#19665846)
>Ideally you should be able to change UI frameworks without altering or moving any of your business logic.
That's just as shit imo, adding unnecessary complexity for the sake of adding it. If you are choosing a framework, you are betting on it, why complicate things. Might as well write in Vanilla JS at that point.