This is my first time to learn react and I began to watch a tutorial but when I write the code it doesn't show me anything on the browser so what is the problem? inbox.html:
<html>
<head>
<link rel="stylesheet" href="index.css">
<script crossorigin src="https://unpkg.com/react@17/umd/react.development.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@17/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
</head>
<body>
<h1>Hello, React!</h1>
<div id="root"></div>
<script src="index.js" type="text/babel"></script>
</body>
</html>
index.js:
ReactDOM.render(<ul><li>Thing 1</li><li>Thing 2</li></ul>, document.getElementById('root'));
and also there is an empty index.css file and all of them are saved in one folder so what is the problem
CodePudding user response:
I tested you code here and I no saw nothing wrong. It's correct, is working.
CodePudding user response:
Please the quickest solution is to begin again. If you have created this app and it is not running than there must be some problem in how you made it. Also try to close the program and type npm start again maybe this may help.