Linked Questions
23 questions linked to/from React router changes url but not view
1
vote
1
answer
2k
views
React redux and React router,link change does not re render view [duplicate]
I a few <Link/> elements and a few corresponding components that are rendered via the <Route/>
The components that are being rendered by <Route/> are redux connect-ed.
On clicking ...
0
votes
0
answers
154
views
link to a route changes the url but component not re rendered [duplicate]
I am creating signin/signout pages in react
The header contains signin, signup or sign out links depending on whether the user is signed in or not. After Signing in, if the user clicks on sign out ...
50
votes
12
answers
33k
views
React Router v4 with multiple layouts
I'd like to render some of my routes within my public layout, and some other routes within my private layout, is there a clean way to do this?
Example that obviously doesn't work, but I hope explains ...
16
votes
3
answers
11k
views
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.jsx, the URL changes, but the ...
5
votes
2
answers
14k
views
React history.push requiring a forceRefresh
I have implemented createBrowserHisotry according to this post How to get history on react-router v4?, however it only redirects if I set a configuration property to forceRefresh: true. If I do not ...
3
votes
3
answers
20k
views
React Router Renders Blank Page
I am building a react application and the react router renders a black page. I've googled around and can't seem to figure out what's going on.
index
import React from 'react'
import {render} from '...
1
vote
2
answers
3k
views
how to debug react router not loading component on url change
I'm using react-router-dom version 4.3.1
Upon clicking the link, the URL changes but React Component is not rendered (in fact the debugger does not stop at any point in my code).
I have already tried ...
0
votes
1
answer
2k
views
React router: Link changes url but doesn't load component
this has been driving me crazy. I have an app using react-router. When I load from the server everything works correctly. But when I try to hit a route through the Link component, it just changes the ...
0
votes
1
answer
1k
views
How to properly redirect with React Router?
I am trying to setup a simple authentication redirection with React and React Router.
Here are important packages and their versions I am using:
{
"react": "^16.3.1",
"react-dev-utils": "^5.0.1",...
0
votes
1
answer
502
views
Routing in ReactJS. URL is displayed but component is not rendered
I have the following piece of code in my parent component:
class App extends Component {
render() {
return(
<Router>
<div>
<Route exact path='/' ...
1
vote
0
answers
779
views
react router not rendering the view but url is changing
I have two tabs: Profile and Friends and the navlink are as follows
<Navlink to={'/dashboard/profile/' + (tab.url) + '/' + userId}>{tab.name}</Navlink>
where tab = [{
"name": "...
0
votes
0
answers
706
views
useNavigate is redirecting me to the same page but the URL changes
I am trying to redirect to another page after the onSubmit and setRoom variables are received from the user's input. However, once I press submit the page reloads and a question mark appears next to ...
0
votes
1
answer
635
views
React-Router: Component is not rendered but URL changes
I am new to React js.
I am implementing the drawer (material-ui), so when user clicks on left menu (LeftMenu.jsx); the respective component should get render in the center (i.e, MainContent.jsx)
...
0
votes
0
answers
497
views
React redirects after successful login , but page doesn't get updated until refreshing
I have a problem with routing. I have a login page, where, after successfully logging in, the user must be redirected to the main page. Actually it changes the path in browser and redirects, but the ...
0
votes
2
answers
357
views
react-router-v4 not redirecting properly
I have got the url to change to the url I want it to, but the only way I can get it to work is by refreshing the page and then it goes to the url.
An example is lets say I am on localhost:3000/signin ...