3 ms·
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 an
by parthdesai 8y ago
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
- viklove 8y agoThat'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.
- parthdesai 8y ago>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.
- mosdl 8y agoIt adds easier testability - you can test the logic outside of the framework.