3 ms·
> Write your application logic in easily testable vanilla JavaScript and use React for rendering application state into DOM. The question is, should the logic
by azangru 8y ago
> Write your application logic in easily testable vanilla JavaScript and use React for rendering application state into DOM.
The question is, should the logic be in the central core of the application, or should it be spread around among the components?
The concentric structure of a cleanly architected app will suggest that the app logic should be centralized, while the framework should just be an implementation detail. However, centralizing and abstracting away the logic makes for code that is 1) harder to delete; 2) harder to code-split.
- zachrose 8y ago> The question is, should the logic be in the central core of the application, or should it be spread around among the components? There are probably many such questions and at this point we’re trying to solve a problem that may not exist in an application we know nothing about. However, with test coverage (and maybe also type annotations) you can delete or move that code around with greater confidence, which means your decision doesn’t have to be as hard or permanent.