Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

174
Views
react router render page blank

I get a blank page with my render. I checked in the other similar questions to find the solution but I still get this blank page. THank you for your help!

This is my code:

App.js

import logo from './logo.svg';
import './App.css';
import React, { Component } from 'react'
import Events from './components/Events/Events';
import { BrowserRouter, Route, Routes } from 'react-router-dom';


function App() {
  return (
    <div className="wrapper">
      <h1>Marine Mammals</h1>
      <BrowserRouter>
      <Routes>
        <Route path='/Events' element={<Events/>}>
          <Events/>
        </Route>
      </Routes>
    
      </BrowserRouter>

    </div>
  );
}



export default App;

Events.js

import React from 'react';

export default function Events(){
  return<h2>Events</h2>;
}

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

I think you need to look at your react-router-dom version.

In V5 you use tags between the component that should appear in the route(nested). In version 6 you can use the element within the tag.

https://reactrouter.com/docs/en/v6/upgrading/v5#relative-routes-and-links

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!