Archives : April-2021

My <Redirect/> works correctly on all components under my App.js, which defines the <Router> structure. For example, if I have <SomeComponent> somewhere down below, this correctly redirects to /error in case of errors: SomeComponent.js return (<> { error.message && <Redirect to="/error" /> } But on the top-level in App.js I also need to check for ..

Read more

I am trying to pass the props in the route component, I know we cannot directly pass to that, so I used to render, but the props are still undefined in the child component. import React from ‘react’; //components import Register from ‘../components/register/register’; import Login from "../components/login/login"; import ForgetPassword from ‘../components/forget-password/forget-password’; //redux import {store} from ..

Read more