4 ms·
Yes and no. Ideally the main logic part should have none of the html-like part. Views should be dumb and do as little as possible. Of course in practice ... T
by Swizec 10y ago
Yes and no. Ideally the main logic part should have none of the html-like part. Views should be dumb and do as little as possible.
Of course in practice ...
This is def a lot better than what I currently use in production: Handlebars hacked to the point of almost being JavaScript but not really. Then you both have views with too much logic and they're annoying to implement.
At least with React you get the full expressiveness of JS right in your views.
- wereHamster 10y ago> Views should be dumb and do as little as possible. Yes, just like React advocates.
- BigJono 10y agoI played around with a lot of different architectures for my React applications, and eventually ended up with something very close to traditional MVC, with components that are either view components, or controller components, but not both.
- kowdermeister 10y agoIt's just about personal taste. MVC is fine, I've built quite a few apps with that approach. JSX is weird but I still find it a viable approach. #nosilverbullet :)
- kowdermeister 10y agoI ditched handlebars because of that. I used dust and some twig implementation.