This is my index.js file
import React from 'react';
import React DOM from 'react-Dom ';
import {BrowserRouter as Router} from 'react-router-Dom ';
import App from './App';
import './index.css'
React DOM .render();
I’m new to react so a bit confused on how to go about making the changes
3
Answers
You code should look like this (replace
'app'
with'root'
or similar, whatever your<div>
inindex.html
is)Change your index.js to this:
Replace your code with this in index.js/ts file