Skip to content

Commit b3a0691

Browse files
jpbourgeonebrillhart
authored andcommitted
Fix: createHashHistory import syntax (FormidableLabs#662)
This change fixes the following warning raised by ``history`` in the browsers : ```shell Warning: Please use `require("history").createHashHistory` instead of `require("history/createHashHistory")`. Support for the latter will be removed in the next major release. ```
1 parent 797d129 commit b3a0691

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/utils/controller.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
import React, { Component } from 'react';
2-
import createHistory from 'history/createHashHistory';
2+
import { createHashHistory } from 'history';
33
import PropTypes from 'prop-types';
44
import { updateRoute } from '../actions';
55
import { countSlides } from './slides';
66

77
import theme from '../themes/default';
88
import Context from './context';
99

10-
const history = createHistory();
10+
const history = createHashHistory();
1111

1212
export default class Controller extends Component {
1313
static propTypes = {

0 commit comments

Comments
 (0)