Teo
Teo

Reputation: 240

How JS syntax like var a = (xml code) works?

I'm confused. How can this work? This piece of js script file is from working project.

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

May it be some kinda template engine?

Upvotes: 1

Views: 51

Answers (1)

Quentin
Quentin

Reputation: 944081

It doesn't. That isn't JavaScript. It is JSX and needs to be run through a preprocessor to convert it to JavaScript before you can use it.

Upvotes: 3

Related Questions