Category "react-router"

How do I link to another page in my MUI mini drawer sidebar?

I've tried to encapsulate my ListItem component with <Link to"/create> but it doesn't work, i've also tried using the history option but that confused me.

React.js URL changes but view does not change

I am new to React.js. I am using React.js 18.0.0. I am developing simple login application. Here I am facing problem in routing. When I click on forget password

Issues while trying to pass data from one page to another using Link from React-Router v6

I have the following Router: // index.js import { BrowserRouter as Router, Routes, Route } from "react-router-dom"; import history from "./history";

Testing React Component with React Router V6

I understand that React Testing Library has an example of testing with react router, but I couldn't get it to work (I think because I am using react router V6).

react-router-dom v6 StaticRouter context is not working

I'm trying to make SSR React web application. Everything works fine except staticContext. My server code is // IMPORTS const renderer = (req, store, context) =

React - pass context to SweetAlert popup

My context is as follows: import React, {createContext, useEffect, useState} from "react"; export const CartContext = createContext(); const CartContextProvid

React-router-dom v6 params

How do I create a route in react using react-router-dom v6? Currently I'm trying: <Route path="/registration:id" element={<Registration />} /> With

React-router showing invalid hook call

An invalid hook error occurred in my react app caused by react-router but I can't seem to detect where it's coming from. The full error reads as follows: Error:

How to add title of a article into URL in Reactjs?

I am trying to know if it is possible or not to add the title of an article into the URL after redirecting to a specific article? An example: https://www.analyt

Property 'exact' does not exist on type

I am trying to use react-router-dom inside my react app and also I am using typescript instead of javascript. The issue here is that I can't import Route inside

Matched leaf route at location "/" does not have an element

Matched leaf route at location "/" does not have an element. This means it will render an with a null value by default resulting in an "empty" page //App.js Fi

Split Routes inside a single Switch into multiple components

I'm using React Router v5 and I ran into problems when trying to define routes split across multiple components. The case I tried is something like the followin

React application built on top of firebase renders 404 on page refresh

We have a React App built on top of firebase. The problem we are facing is if you change the url by navigating to a different page other than the root '/', then

React/TypeScript app fails to deploy to subdomain (404)

Hi I made react typescript app. Everything works perfect on localhost and domain, but when I upload same build folder to the subdomain i have 404 error. My .hta

Next.js router.query getting undefined on refreshing page, but works if you navigate to it from Link component [duplicate]

Why is router.query empty when I refresh a page with the correct id in the URL, but when when I navigate towards it through , it works? say I

React Components Rendering Error in Electron-React-Boilerplate

Good Afternoon all, I built a React.js web music-player application a while ago, and now I am transforming my old react application into a downloadable des

React: How to get current Route path on each route change? React-router v5

The following code is giving base route instead of nested routes or I can say the current route function test() { const route = useRouteMatch(); useEffect((

React: How to get current Route path on each route change? React-router v5

The following code is giving base route instead of nested routes or I can say the current route function test() { const route = useRouteMatch(); useEffect((

How to debug npm ERR! errno -4094? [duplicate]

I'm doing my first React project, and following the MOOC instructions, I've had to create routes by this command : npm install react-router-do

ReactJS app inside Laravel's public folder .htaccess configurations

I am hosting a React application inside the public directory of a Laravel app where: /public_html/ app bootstrap config