11 ms·
When I use React I do exactly the same, too. Templates are not that different from components in terms of code ortanization. Components don't have to be reusabl
by danabramov 10y ago
When I use React I do exactly the same, too. Templates are not that different from components in terms of code ortanization. Components don't have to be reusable at all—it's just nice that once you need them to, they are.
- sametmax 10y agoThis works only if you are a full js stack. Using any other language means you get 2 sets of templates.
- danabramov 10y agoNot sure what you mean. My point is that you can “keep everything in one component” in React exactly the same way you’d do it in Angular or Vue.
- sametmax 10y agoIf you use django/rails, suddenly you have django/rail template files and templates in your components.