skip to Main Content

Javascript – Getting id undefined even it exists in params object, in React Router

import { RouterProvider, createBrowserRouter } from "react-router-dom" import AppLayout from "./ui/AppLayout" import Questions, {loader as questionsLoader} from './features/questions/Questions' import Companies from './features/companies/Companies' import Users, {loader as usersLoader} from './features/users/Users' import Tags from './features/tags/Tags' import Error from './ui/Error' import User, {loader…

VIEW QUESTION

Html – Changing the routing logic

I decided to improve the routing in the pet project and found such an opportunity in the guide so that it would be possible to add chats. import React from 'react'; import { Routes, Route } from 'react-router-dom' import Layout…

VIEW QUESTION

Javascript – React Custom Hook Issue

I'm playing around with React to build a simple little recipe keeper app and I'm coming across an issue I haven't yet figured out. import { useParams, useHistory, Link } from "react-router-dom"; import useFetch from "./useFetch"; const RecipeDetails = ()…

VIEW QUESTION

Javascript – Reactjs routing composed routes

I'm having some difficulty with react routing and having trouble comprehending composed routes. I've attempted some code, but unfortunately, it's not functioning as expected. The "/" path works perfectly fine, however, when I attempt to access "/child", it doesn't seem…

VIEW QUESTION

Javascript – index.tsx:532 Uncaught TypeError: Cannot destructure property 'basename' of 'react__WEBPACK_IMPORTED_MODULE_0__.useContext(…)' as it is null

My code has a component called MainLayout: MainLayout.jsx import React, { Fragment } from "react"; import Header from "../Common/Header"; import Footer from "../Common/Footer"; export default function MainLayout({ children }) { return ( <Fragment> <Header /> {children} <Footer /> </Fragment> );…

VIEW QUESTION
Back To Top
Search