Skip to main content
Code Review

Return to Answer

replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

An alternative to @stuart's solution is to use a javascript template engine, like handlebars.

As a rule of thumb, I think that as soon as you create a render function, you should ask yourself if such a template engine would be useful. Template engines allow you to render html in a declarative way, which is often much more readable.

There is plenty of existing engines, check this stackoverflow question this stackoverflow question for more insight.

An alternative to @stuart's solution is to use a javascript template engine, like handlebars.

As a rule of thumb, I think that as soon as you create a render function, you should ask yourself if such a template engine would be useful. Template engines allow you to render html in a declarative way, which is often much more readable.

There is plenty of existing engines, check this stackoverflow question for more insight.

An alternative to @stuart's solution is to use a javascript template engine, like handlebars.

As a rule of thumb, I think that as soon as you create a render function, you should ask yourself if such a template engine would be useful. Template engines allow you to render html in a declarative way, which is often much more readable.

There is plenty of existing engines, check this stackoverflow question for more insight.

Source Link
m_x
  • 956
  • 5
  • 13

An alternative to @stuart's solution is to use a javascript template engine, like handlebars.

As a rule of thumb, I think that as soon as you create a render function, you should ask yourself if such a template engine would be useful. Template engines allow you to render html in a declarative way, which is often much more readable.

There is plenty of existing engines, check this stackoverflow question for more insight.

default

AltStyle によって変換されたページ (->オリジナル) /