skip to Main Content

Reactjs – React Router 6 flickr on Link click in React 18 App

I created a React 18 app that uses React Router 6 <body class="h-full"> <div id="root"></div> <script src="/src/main.tsx" type="module"></script> </body> </html> main.tsx: const container = document.getElementById('root') const root = createRoot(container) root.render( <React.StrictMode> <BrowserRouter basename={'/'}> <Routes> <Route path="/" element={<Shell />} /> </Routes>…

VIEW QUESTION

react-router-dom & nginx -> path /equipe/:id return index.html

I use react-router-dom in my react application like this: import {BrowserRouter, Route, Routes} from "react-router-dom"; // other code... ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render( <BrowserRouter> <Routes> <Route path="equipe" element={<Equipe/>}/> <Route path="equipe/:id" element={<Equipe/>}/> {/*other route...*/} </Routes> </BrowserRouter> ); I specify that by launching my…

VIEW QUESTION
Back To Top
Search