DEV Community

Discussion on: Anyone else intolerant of html inside javascript? yes i mean React

Collapse
 
noccy80 profile image
Christopher Vagnetoft

I would say the upside is you can return html primitives from functions to create snippet factories. I.e. a function can return an actual div or button or whatsit without building a DOM fragment or calling templating functions. IMO these methods are not mutually exclusive.

x.createMagicButton() is useful when you need a prefab button that you then build on.

y.getUserProfile() would be useful to build a complex presentation box or something by passing data through a template.

Think this has more to do with people getting a new hammer and making every problem a nail :) Realize it's potential and use it where it makes sense.

I'm no fan of Node, but Jsx is interesting :)