4 ms·
React does not require you to use JSX. Writing views with React.DOM is actually a quite nice alternative. This article gives an explanation: https://www.packtpu
by matroosberg 11y ago
React does not require you to use JSX. Writing views with React.DOM is actually a quite nice alternative. This article gives an explanation: https://www.packtpub.com/books/content/using-reactjs-without-jsx https://www.packtpub.com/books/content/using-reactjs-without...
However, newer React and Babel versions no longer compile JSX to React.DOM methods as the article shows, but other methods. Example for Babel: https://babeljs.io/repl/#?experimental=false&evaluate=true&loose=false&spec=false&code=React.renderComponent(%0A%3Ch1%3EHello%2C%20world!%3C%2Fh1%3E%2C%0Adocument.getElementById('example')%0A)%3B%0A%0A https://babeljs.io/repl/#?experimental=false&evaluate=true&l...