Category "react-router-dom"

is there a way to implement react scroll along with react router dom?

I have a navbar with links that scroll to sections of page using react-scroll. i also have several pages and im using react-router-dom for navigating between pa

Why isn't my React context being updated?

When I use the app and navigate to the SetContext component, I see the value of auth is correct ("dummy value") and after entering a value in the edit field and

I'm getting blank react-app page on using Route

I'm having some kind of trouble when I'm using Router in App.js I'm getting a blank page when I am using, I tried a lot but couldn't found a way to solve the is

how to solve Matched leaf route at location "/project" does not have an element error?

I'm learning react routing but when I try to use BrowserRouter I'm getting the following error: Matched leaf route at location "/project" does not have an elem

Redirect in React Router Dom v6

I need help after the update from React Router Dom to version 6. I have a code snippet for redirects after a user logged in which should work in version 5, but

What is the difference between Nav.Link vs Link vs NavLink in react router DOM and react bootstrap?

I am confused about these three Links, what are the different ways to use them? Nav.Link Link NavLink i Do they have different use cases?

how to add props in route component in react-router-dom v6

As heading states, I used to have a page with a stateful component that gets different props based on changes to url made from . Now, upgraded to react router v

React-router-dom Link change the URL but it doesn't render the component in Rect JS

I am using React js components and want to render something by access some URL so problem is when i click on the Link it change the URL but does not render the

How to redirect in React Router v6?

I am trying to upgrade to React Router v6 (react-router-dom 6.0.1). Here is my updated code: import { BrowserRouter, Navigate, Route, Routes } from 'react-route

React Router V6 - Error: useRoutes() may be used only in the context of a <Router> component

I have installed react-router-domV6-beta. By following the example from a website I am able to use the new option useRoutes I have setup page routes and returni

React Router works only after refreshing the page

I am a bit new to react and I am facing a problem with the Router. The routing works when I enter the URL directly on the browser, however when I click on the l

Protected routes not accessible even after signing or logging in

I am making a site whereby after the user signs in, the user is meant to be redirected to the home page. The homepage and all the other pages of the site are on

How to use MemoryRouter in order to test useParams call

I have a hypothetic React component named Component.ts with a code structure similar to that: import React, { FC } from 'react'; import { useParams } from 'rea

Linking components in React using React Router Link not working

I am new to React and I am creating a portfolio web page in which I am trying to connect two components with the Link component in react-router-dom (similar to

Render the detailed page when clicking on a linked item on the sidebar menu

I am working on the sidebar. Currently, I have a few items on my sidebar. When I select an item, it shows a few details on the main area. Actually, I have a lar

How can I apply React Router v6 and react-transition-group transition to only specific routes?

what can I do if I want to exclude some 'routes' from the transition? For example, the routes are as follows; <Routes> <Route path="/login" element={

Link tag inside BrowserRouter changes only the URL, but doesn't render the component

I am building a Netflix clone application, and I am using react-router-dom v5 to switch between different pages. However, when I click the Link tag in Navbar.js

React + Material UI - Best way to prevent child tree from remount when toggling parent theme

Background I wanted to follow Material UI's implementation of toggling UI's dark/light mode theme. Link. I have encapsulated its implementation into a custom ho

"React does not recognize the prop on a DOM element" in React Router

React does not recognize the computedMatch prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowerc

Passing state to another component

In my MUI Table I navigate the user to another page when is clicked over the row. Is there a option to pass the data from the row directly with useNavigate, ins