3 ms·
Precisely the reason I missed angular when going to react and why I now love vue (which is kinda the best world of both): most of the time, you don't start with
by sametmax 10y ago
Precisely the reason I missed angular when going to react and why I now love vue (which is kinda the best world of both): most of the time, you don't start with reusable components. You just hack on your template, and maybe, maybe, if your project grow, you start extracting common code into reusable widgets.
- danabramov 10y agoWhen 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.