reactjs – Page routing fore React.js and Vite.js application

How would I change main.jsx to add a login page to my application?


import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App.jsx'
// import login and admin pages here
import './index.css'

ReactDOM.createRoot(document.getElementById('root')).render(
  <React.StrictMode>
    <App />

  </React.StrictMode>,
)

I’ve tried importing Login.jsx to my index.jsx, navbar.jsx, and main.jsx and can’t figure out the routing.

Read more here: Source link