Teo Teo -4 years ago 71
Node.js Question

What js template engine is that?

I'm working in huge nodejs project. It comes from outsource guys. It contains hundreds of plugins and libraries. I can't recognize a template engine which uses in it. Can someboby help with this?
Samples:

var $mapsIfAlbum = (
<section class="slide section" data-index="2" style={{top: mapsPos + '%', zIndex: mapsPos}}>
<div class="maps">
{info}
<_Maps />
</div>
</section>
);


This one looks like Mustache, but both pieces are in one file. Is it posible to use two template engines in one file?

var bodyStyles = `
${hideIconsWhenMobile}
@media screen and (max-width: 720px) {
body {
background: #fff !important;
}
}
`;

Answer Source

The first looks like it's JSX which is commonly used with React.

And yes like others have mentioned, the second one is a template literal.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download