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

134
Views
initial configuration error react router dom v6

I'm trying to configure the react router dom route structure, but apparently my routes are not being recognized within the application

routes/index.tsx

import React from 'react';
import { inject, observer } from 'mobx-react';
import { Routes, Route, Link } from "react-router-dom";
import {
  Main,
} from '../scenes';
import { Routes as RoutesPath } from './routing';

const RoutesContainer: React.FC = () => (
  <Routes>
    <Route path={RoutesPath.MAIN} element={<Main />} />
  </Routes>
);

export { Routes };
export default inject('routing')(observer(RoutesContainer));

index.tsx (aplication)

import React from 'react'
import { Provider } from 'mobx-react';
import { render } from 'react-dom'
import './index.css'
import store from './stores';
import { Routes } from './routes';
import { BrowserRouter } from 'react-router-dom';

render(
  <Provider rootStore={store}>
    <BrowserRouter>
      <React.StrictMode>
        <Routes />
      </React.StrictMode>
    </BrowserRouter>
  </Provider>,

  document.getElementById('root')
)

If I remove my component, and add some text it displays correctly, but with the component it displays a blank screen.

about 4 years ago · Juan Pablo Isaza
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!