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

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -