Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm not sure what you mean by "templates" here.

React gives you a set of tools to generate markup safely. The syntax we prefer to use for it is JSX, but if you'd prefer to do it your own way, that's great too. You can organize your app however you want by splitting the DOM generation code into separate files if you wish.



Markup generated from javascript isn't manageable enough. That is why it is not recommended to have templates/markup generated from js.


Could you elaborate on that? I've seen that viewpoint a number of times but I've never understood why it's considered a cardinal sin to have templates generated from js.


Historically, you are correct. However this is one of the strengths of React. Try it out and see if it suits your needs




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: