skip to Main Content

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

Reactjs – Linking to the another page, but getting output on the same page (Below) REACT

App.js :- function App() { return ( <div className="App"> <header className="App-header"> <div className="bg-slate-700 w-100 flex flex-col justify-center h-full"> <h1 className="font-bold text-white text-center justify-center "> User Authentication </h1> <form className="flex flex-col p-6 m-8 space-y-2 rounded-md bg-white "> <div className="text-cyan-500 text-center ">…

VIEW QUESTION

Reactjs – React routes has bugs

import './App.css'; import { BrowserRouter as Router, Routes, Route, Navigate } from 'react-router-dom'; import { useEffect, useState } from 'react'; import MyHome from './components/MyHome'; import Header from './components/Header'; import Footer from './components/Footer'; import CommentList from './components/CommentList' import PostComment from './components/PostComment';…

VIEW QUESTION
Back To Top
Search