0

In my react application if I am sending a query parameter like localhost:8000/?param1=value1, it gets converted to localhost:8000/?param1=value1#/. I am new to this not really sure how it works. ConnectedRouter is being used :

<Provider store={store}>
        <ConnectedRouter history={hashHistory}>
          <AppRouter />
       </ConnectedRouter>
 </Provider>


 const AppRouter = () => (
  <Switch>
    <Route ...... />
    <Route ...... />
    .....
  </Switch>
);
hack
  • 1,403
  • 2
  • 14
  • 20
  • by sending you mean making a get/post query ? how do you do it ? – AlainIb Dec 11 '19 at 23:48
  • Seems strange to be using `hashHistory` as it's a history implementation only intended for legacy (old) browsers. Also you're creating your own router component called `AppRouter` inside of another router component - those are probably interfering with each other. – Michael Abeln Dec 12 '19 at 00:37
  • If you don't need to use `hashHistory`, use `BrowserHistory`. Check out the examples in the documentation and see how connected router is setup: https://github.com/supasate/connected-react-router. Specifically, look at the `ConfigureStore.js` file. – RodCardenas Dec 12 '19 at 01:03

0 Answers0