import { Navigate, Routes, Route, BrowserRouter } from “react-router-dom”; import…
Jump to turn (12)
- 1import { Navigate, Routes, Route, BrowserRouter } from “react-router-dom”; impor
- 2still got this history.ts:480 Uncaught Error: [Routes] is not a component. All c
- 3nothing have change. also this is my mainlayoutcode. check all import Sider from
- 4but why no roomMain or RoomDetail ? i just got only the layout . this is my room
- 5im sure that there is no wrong with my RoomMain or RoomDetail, focus to fix this
- 6im so sure!! PLease check the Router components? is it true? try to think
- 7OKay, this is my roomMain code import { Input, Button } from 'antd'; import Room
- 8and this is the Router that you teached me? why it doesnt work??
- 9bruh, when i try to console.log(children) in interface MainLayoutProps { childre
- 10the props stll undefined
- 11i follew your code but the children still undefined import Sider from '../compon
- 12it still undefined
- User
import { Navigate, Routes, Route, BrowserRouter } from “react-router-dom”; import MainLayout from “…/Layout/mainLayout/MainLayout”; import RoomMain from “…/Rooms/pages”; import RoomDetail from “…/Rooms/pages/Detail”;
export default function Router() { return ( <Route path=“/” element={} /> <Route path=“/*” element={} > <Route path=“/room” element={} /> <Route path=“/room/:roomId” element={} /> ); }got this error [Routes] is not a component. All component children of must be a or <React.Fragment>
- Assistant