After running the npx create-react-app my-app, cd my-app, npm start. It launched a browser on localhost:3000. After which I opened the index.js file the ReactDOM.render() method read
ReactDOM.render(
<React.StrictMode>
<App />
</React.StrictMode>
document.getElementById('root')
);
ReactDOM.render(
<h1> Hello, React! </h1>
document.getElementById('root')
);
The output is supposed to show Hello, React!. instead its showing the output from app.js. please I want my output to read "Hello React!"
Remove the first render... You have 2 render... Js runs from top to bottom, so it's rendering the first one
You have two ReactDOM.render, remove the first one with the component.
You will be left with this code:
ReactDOM.render(<h1> Hello, React! </h1>, document.getElementById('root'));
It should work like this.