Skip to content
This repository has been archived by the owner on Jan 12, 2024. It is now read-only.

Warning when wrapping router #20

Open
ndevvy opened this issue Oct 9, 2017 · 3 comments
Open

Warning when wrapping router #20

ndevvy opened this issue Oct 9, 2017 · 3 comments

Comments

@ndevvy
Copy link

ndevvy commented Oct 9, 2017

I'm setting up Opbeat with my React app and get a console warning when I patch my router using wrapRouter per the setup instructions:

Warning: [react-router] `Router` no longer defaults the history prop to hash history. Please use the `hashHistory` singleton instead.

React also fails to render anything when using the wrapped router.

I'm using browserHistory; here is my relevant code (initOpbeat is called earlier, from a separate initializers file):

import React, { Component } from 'react';
import { Provider } from 'react-redux';
import DashboardRoutes from './DashboardRoutes';
import store from './RootStore';
import { wrapRouter } from 'opbeat-react';
import { Router, browserHistory } from 'react-router';
const OpbeatRouter = wrapRouter(Router);

export default class Root extends Component {
  render() {
    return (
      <Provider store={store}>
        <OpbeatRouter history={browserHistory}>{DashboardRoutes}</OpbeatRouter>
      </Provider>
    );
  }
}

Any guidance on this would be appreciated. I'm using react-router 2.8.1.

@hmdhk
Copy link
Contributor

hmdhk commented Oct 11, 2017

Thanks for reporting the issue @ndevvy ,
Let me investigate and get back to you.

@indigoviolet
Copy link

@jahtalab any updates on this issue?

@hmdhk
Copy link
Contributor

hmdhk commented Oct 19, 2017

@indigoviolet ,

Thanks for reaching out.
Unfortunately no updates yet.
I will make sure to update this issue as we progress.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants