Nested Routing Not working in new Version in React-router "react-router-dom": "^6.15.0" #10884
Unanswered
mahendrameghwal
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
not working nested routing in new version i am stcuk with this problem since many days
import { createRoot } from "react-dom/client";
import "./index.css";
import { createBrowserRouter, RouterProvider ,Route, createRoutesFromElements, Routes } from "react-router-dom";
import Layout from "./layout/Layout";
import Home from "./pages/Home";
import BrowseCompnies from "./pages/BrowseCompnies";
import FindJobs from "./pages/FindJobs";
import CompanyProfile from "./pages/CompanyProfile";
import ErrorPage from "./pages/ErrorPage";
import ViewApplication from "./pages/ViewApplication";
const router =createBrowserRouter(
createRoutesFromElements(
createRoot(document.getElementById("root")).render( );
this is my card i want here to click to i want all detail accroding to id but now just i taking for example
import {Link } from "react-router-dom";
const BrowseCompniesCard = () => {
const arr =[1,2,3,4,5,6,7,8];
return (
Apple
Location : Jaipur
Lorem ipsum dolor sit amet consectetur adipisicing elit. Natus, officia.
)
}
export default BrowseCompniesCard
here is my profile page but not rendring on UI
import { Link, useParams } from "react-router-dom";
import logos from "../assets/compnies/adobe.svg"
import {FaLink, FaLinkedinIn} from "react-icons/fa"
const CompanyProfile = () => {
const {id}= useParams()
console.log(id);
return (
profile {id}
i am getting prefect Url which i want but not profile component render on UI how it possible i am new in this version
Beta Was this translation helpful? Give feedback.
All reactions