This repository was archived by the owner on Jan 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Warning when wrapping router #20
Copy link
Copy link
Open
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels