3 ms·
"It also breaks a rule that I've never cared for, where your templates are supposed to be separate from your code." This is not a "rule" that I came upon - I f
by Bahamut 13y ago
"It also breaks a rule that I've never cared for, where your templates are supposed to be separate from your code."
This is not a "rule" that I came upon - I figured out how crappy having your templates tied to your JS makes working with quickly on my own. It is an absolutely ugly pattern.
- jbeja 13y agoActualy is not, IMHO we are not writing templates but components that are meant to be insolate with a single responsability in mind, not more. There, with can start building higher components combining the lower one to make the app, the Reactjs approach hold separation of concerns but in a different way that maybe you are not use to. If the jsx syntax is what is holding you back is actualy optional like the Reactjs documentation clarify , you can use browserify or requirejs to separate the React.DOM objects in a diffirent file from your logic too. Cheers :)
- catshirt 13y agoit's an ugly pattern when you're inlining function strings as HTML attributes. if you can reference functions directly as attributes of your views it actually makes perfect sense. mixing your templates and your code sucks when you're working in 2 languages across 2 files and you have to glue everything together. as soon as you're writing them both to the same target it makes perfect sense. especially since react still uses the DOM event model behind the curtains.
- deleted 13y ago[deleted]