We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I need redirect to page home with basename '\admin'.
Steps
Expected Behavior render home component
Actual Behavior Component isn't render and error in console: No routes matched location "/admin/home"
I have such dependencies:
"@reduxjs/toolkit": "1.8.5", "history": "5.3.0", "react": "18.2.0", "react-dom": "18.2.0", "react-redux": "8.0.2", "react-router-dom": "6.4.0", "react-scripts": "4.0.0", "redux": "4.2.0", "redux-first-history": "5.1.1", "redux-saga": "1.2.1"
index.js
import { StrictMode } from "react"; import { createRoot } from "react-dom/client"; import { Provider } from "react-redux"; import { HistoryRouter } from "redux-first-history/rr6"; import App from "./App"; import { history, store } from "./store"; const rootElement = document.getElementById("root"); const root = createRoot(rootElement); root.render( <StrictMode> <Provider store={store}> <HistoryRouter history={history}> <App /> </HistoryRouter> </Provider> </StrictMode> );
app.js
import { Navigate, Route, Routes } from "react-router-dom"; import About from "./About"; import Home from "./Home"; import "./styles.css"; export default function App() { return ( <Routes> <Route path="/" element={<Navigate to="/home" replace />} /> <Route path="/home" element={<Home />} /> <Route path="/about" element={<About />} /> </Routes> ); }
store.js
import { combineReducers } from "redux"; import { configureStore } from "@reduxjs/toolkit"; import { createReduxHistoryContext } from "redux-first-history"; import { createBrowserHistory } from "history"; const { createReduxHistory, routerMiddleware, routerReducer } = createReduxHistoryContext({ history: createBrowserHistory(), basename: "/admin" }); export const store = configureStore({ reducer: combineReducers({ router: routerReducer }), middleware: [routerMiddleware] }); export const history = createReduxHistory(store);
I have example
The text was updated successfully, but these errors were encountered:
#95. duplicate
Sorry, something went wrong.
No branches or pull requests
I need redirect to page home with basename '\admin'.
Steps
Expected Behavior
render home component
Actual Behavior
Component isn't render and error in console: No routes matched location "/admin/home"
I have such dependencies:
index.js
app.js
store.js
I have example
The text was updated successfully, but these errors were encountered: