lagunovsky / redux-react-router

A Redux binding for React Router v6
MIT License
72 stars 9 forks source link

Cannot read properties of undefined (reading 'action') #13

Closed itschip closed 1 year ago

itschip commented 2 years ago

image I seem to be having an issue with this. The error seems to occurr from the ReduxRouter provider, or atleast where it is called.

I am using

    "react-dom": "^18.2.0",
    "react-router": "^6.3.0",
    "react-redux": "^8.0.2",
    "react-router-dom": "^6.3.0",
    "react-scripts-ts": "2.17.0",
    "redux": "^4.2.0",
    "redux-saga": "^0.16.0",
    "redux-thunk": "^2.2.0",
import {createBrowserHistory} from "history";

const history = createBrowserHistory()
const store = configureStore(history, {}, rootSaga);

const render = () => {
    createRoot(document.getElementById("root") as HTMLElement).render(
        <Provider store={store}>
            <ReduxRouter history={history}>
                <App/>
            </ReduxRouter>
        </Provider>,
    );
}

render();

Any suggestions?

lagunovsky commented 2 years ago

What version of the history package are you using? Where and how do you use createRouterReducer? What does reduxRouterSelector return when it is called in the render()?

Could you create a repository with your build environment?

itschip commented 2 years ago

I figured it out....called my router reducer routing instead router. I could've used a custom selector but eh.