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

747
Views
React Router 6 in Electron - No routes matched location

I am trying to use react-router v6 in an electron js application.

but it doesn't work for me.

This App works correctly without implementing the react-router!

When I use the react-router v6, I will get this message in the console, and doesn't show the content

No routes matched location

Project Structure

enter image description here

In this Project, index.html file loads the app.js inside the build folder.

index.js

App.jsx

    import React from "react";
    import { BrowserRouter as Router, Routes, Route, Link } from "react-router-dom";
    import { Home, Blog } from "./pages";
    import "./App.scss";

    const Application = () => {
      return (
        <Router>
          <nav id="navigation">
            <ul>
              <li>
                <Link to="/">Home</Link>
              </li>
              <li>
                <Link to="/blog">Blog</Link>
              </li>
            </ul>
          </nav>
          <div id="content">
            <Routes>
              <Route path="/" element={<Home />} />
              <Route path="/blog" element={<Blog />} />
            </Routes>
          </div>
        </Router>
      );
    };

    export { Application };
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Try to use HashRouter instead of BrowserRouter

https://reactrouter.com/docs/en/v6/api#hashrouter

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!