Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
chiragkhatri19 opened this issue Feb 13, 2024 · 6 comments
Open

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

chiragkhatri19 opened this issue Feb 13, 2024 · 6 comments

Comments

@chiragkhatri19
Copy link

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

@chiragkhatri19 chiragkhatri19 changed the title At 18:05, I am nit getting the same output At 18:05, I am not getting the same output Feb 13, 2024
@faresbrayek2
Copy link

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

@MatinT-SA
Copy link

MatinT-SA commented Mar 1, 2024

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

@srp8
Copy link

srp8 commented May 1, 2024

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

@MatinT-SA
Copy link

MatinT-SA commented May 1, 2024

@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.

@adarsaparasar
Copy link

adarsaparasar commented Jul 29, 2024

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;

@MatinT-SA
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants