Does anyone know if its possible to seperate that in such a way that Angular or knockout works?
Or am I just not "enlightened" about the way it works? Which is also certainly possible.
Does anyone know if its possible to seperate that in such a way that Angular or knockout works?
Or am I just not "enlightened" about the way it works? Which is also certainly possible.
I invite you to watch "Rethinking best practices", an introduction of what React is and why it was built so: https://facebook.github.io/react/docs/videos.html
You learn that separation of concerns is a good thing, but separating HTML and Javascript is not separation of concerns; it's just an arbitrary separation of technologies.
The mindset of React is that you build independent components, where each one contains everything to render information for the user. Whether you use 1, 2 or 3 technos (HTML+CSS+Javascript) for this component is not an issue and there's no reason to separate them.
for user in users
UserComponent(user)
is much better than some combination of `ng-repeat`, `ng-repeat-start`, `ng-repeat-end`Compared to other virtual-dom/js-as-a-templating-language tools, the most unique thing about react is the way they handle having a hierarchy of stateful components. Virtual dom is very simple if you only have state at the root level and rerender 100% of the page when something changes but it gets a trickyer if you want to distribute the state in a hierarchical manner.
I'd also much rather use a restricted templating engine like Handlebars so that my templates are forced to be "logic-less". I really don't think my template should have access to all of javascript.
But then, I like the full javascript approach from the mithril framework too and I haven't build something complex to date.