3D_portfolio icon indicating copy to clipboard operation
3D_portfolio copied to clipboard

At 18:05, I am not getting the same output

Open chiragkhatri19 opened this issue 1 year ago • 6 comments

After adding the routes, Its not showing the string on the localhost. Help will be appreciated! image

chiragkhatri19 avatar Feb 13 '24 03:02 chiragkhatri19

didi you install https://v5.reactrouter.com/web/guides/quick-start npm install react-router-dom

faresbrayek2 avatar Feb 16 '24 23:02 faresbrayek2

Replace element={'Home'} with element={<Home />} and repeat this process (changing single quotation with a self closing tag for including those components in the Route) and then you're good to go! 😉

github adrian hajdin issues

MatinT-SA avatar Mar 01 '24 11:03 MatinT-SA

I am having the same issue and that did not work.

srp8 avatar May 01 '24 21:05 srp8

@srp8 If you're having the exact same issue with exact same code as the questioner, then by replacing those codes I've mentioned, it has to solve your issue. Otherwise, your problem is related to other sections of your application and you need to check the console for further information.

MatinT-SA avatar May 01 '24 22:05 MatinT-SA

React Router Integration

Code Example

import { Route, BrowserRouter as Router, Routes } from 'react-router-dom';
import Navbar from './Components/Navbar';
import { Home, About, Projects, Contact } from './pages';

const App = () => {
  return (
      <main className='bg-slate-300/20'>
          <Router>
              <Navbar/>
              <Routes>
                  <Route path='/' element={<Home/>} />
                  <Route path='/about' element={<About/>} />
                  <Route path='/projects' element={<Projects/>} />
                  <Route path='/contact' element={<Contact/>} />
              </Routes>
          </Router>
      </main>
  );
};

export default App;

adarsaparasar avatar Jul 29 '24 07:07 adarsaparasar

@adarsaparasar {<Home/>} /> Give a space after "Home" and see if it fixes your issue. Like this: {<Home />} />

MatinT-SA avatar Jul 29 '24 08:07 MatinT-SA