Category "react-router"

React Router Dom v6 - Functions are not valid as a React child

Im trying to upgrade to v6 of react router dom. The application works but I cant seem to get the testcases to work. Before we had this wrapper for jest: const r

MUI Nav Tabs does not work with react-router

Here are the four components: App.js: import React from 'react'; import { Route, Switch } from 'react-router-dom'; import About from './About'; import Home from

Why does my React Router return blank pages?

I am using the latest version of create-react-app. I have searched all tutorials and tried a few websites with different tutorials but I am not getting errors.

React/Redux Testing - Could not find "store" in either the context or props

I'm new to react/redux and just getting into testing my first app with chai. I'm using redux-form/immutable and react-router, and I'm not sure how to resolve th

How to get data from prop.location.state in react?

I try to send data through history push like that. And then I try to get the value of id that I send. The problem is when the first time rendering of compon

Using multiple layouts for react-router components

If I have the following: <Route path="/" component={Containers.App}> { /* Routes that use layout 1 */ } <IndexRoute component={Containers.Home}/&

Using multiple layouts for react-router components

If I have the following: <Route path="/" component={Containers.App}> { /* Routes that use layout 1 */ } <IndexRoute component={Containers.Home}/&

React App url parameter with S3 and CloudFront

My apologies if the information that I have provided is vague as I am not so experience with AWS and React. I have a React Application being deployed on S3 and

A component suspended while responding to synchronous input

error Error: A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that s

React router, redux, electron: router isn't rendering

I'm trying to get react-router to work in an electron app. I'm using a boilerplate and stripped away some of the stuff I don't want but that should provide a pr

Passing props to dynamically rendered components in React

I have a page that is displaying several of my star components that each have their own name and a prop called starType I am generating several different of the

React Native Context rendering a blank screen when wrapped inside <Provider>

I'm trying to build a simple blog native app using context and have stumbled upon an issue to which I can't find a root to. Here's the structure of it: /context

React Routing vs Express Routing

Been watching alot of tutorials and i see that there is express routing as well as react routing. Is the react routing for client and the node js routing for

React Router v4 routes not working

I am relatively new to reacts and I'm trying to figure out how to get React router to work. I've got a super simple test app that looks like this: import React

React.createElement: type is invalid -- expected a string

Trying to get react-router (v4.0.0) and react-hot-loader (3.0.0-beta.6) to play nicely, but getting the following error in the browser console: Warning: React.c

How to do nested conditional rendering in React?

A situation I have not ran into before due to way roles/authentication work in a project I am working on. On login, the code returns whether the user is just a

Target Active Link when the route is active in Next.js

How to target the active Link in Next.js like they way we do it in React-Router-4? Meaning, give the active link a class when its route is active?

How to use React Router with Laravel?

I needing use React Router with a Laravel project. But when I create router on the React Router and try access, Laravel accuse Route not exist error. How to c

React Router: How to stop redirecting until API returns a response?

I have a login page but that authenticates the login on router with a call to the backend. The backend returns a response 200 if the user is authenticated, and

How do you programmatically update query params in react-router?

I can't seem to find how to update query params with react-router without using <Link/>. hashHistory.push(url) doesn't seem to register query params, and