I have learned about Reactjs and know about JSX, but I have tried many ways to work with JSX in sublime text 3 and my code still doesn’t work.
<!-- something.html --> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>Document</title> </head> <body> <div id="test"></div> <script crossorigin src="https://unpkg.com/react@16/umd/react.development.js"></script> <script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script> <script src="something.js"></script> </body> </html>
\\ something.js const JSX = ( <div> <h1>Hello World</h1> <p>Lets render this to the DOM</p> </div> ); ReactDOM.render(<JSX/>,document.getElementById("test"));
I installed ‘Babel’ but my code still doesn’t run. Where did I make a mistake, and is there a way to write JSX in sublime text because I have tried many different ways.