javascript - How does Facebook's React JSX transformer work? -


how possible react allows write jsx (xml) within javascript without throwing errors? have been trying wrap head around it, , not quite sure how underlying code accomplishes this.

simple, looks <script type="text/jsx"> tags, parses them, generates corresponding javascript code, , eval's it.

this why jsx inline transformer should used when developing, having parse jsx code decreases performance of web page. when deploying, should convert jsx code js 1 before deploy.


Comments

Popular posts from this blog

javascript - three.js lot of meshes optimization -

smartface.io - Proper way to change color scheme for whole application -

Email notification in google apps script -