reactjs / react-router-redux

Ruthlessly simple bindings to keep react-router and redux in sync
https://www.npmjs.com/package/react-router-redux
MIT License
7.81k stars 644 forks source link

how to use hashRouter in react-router-redux #627

Closed ahamedfazil closed 6 years ago

ahamedfazil commented 6 years ago

In my application I use react-router-redux for navigation and it works fine. But i want to navigate with hash (#) instead of slash(/).

import createHistory from "history/createBrowserHistory"; const history = createHistory(); createStore( rootReducer, applyMiddleware( promise(), routerMiddleware(history) ) ); < ConnectedRouter history={history}> < div> < App /> < /div> < /ConnectedRouter>

// In my navigation componet I use HashRouter from react-router-dom import { HashRouter as Router, Route, Link } from "react-router-dom"; public render() { return (

Home

} />
);

}

timdorr commented 6 years ago

This is a bug tracker, not a support system. For usage questions, please use Stack Overflow or Reactiflux where there are a lot more people ready to help you out. Thanks!