Skip to content

Commit

Permalink
update example
Browse files Browse the repository at this point in the history
  • Loading branch information
sorrycc committed Jul 13, 2016
1 parent 54b00a1 commit 4bb6ab7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions examples/count/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import dva, { connect } from 'dva';
import { Router, Route } from 'dva/router';
import { Router, Route, useRouterHistory } from 'dva/router';
import { createHashHistory } from 'history';

// 1. Initialize
const app = dva();
Expand Down Expand Up @@ -36,4 +37,6 @@ app.router(({ history }) =>
);

// 5. Start
app.start(document.getElementById('root'));
app.start(document.getElementById('root'), {
history: useRouterHistory(createHashHistory)({ queryKey: false }),
});
3 changes: 2 additions & 1 deletion examples/count/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
"dependencies": {
"dva": "^0.0.6",
"react": "^15.1.0",
"react-dom": "^15.1.0"
"react-dom": "^15.1.0",
"history": "^2.0.1"
},
"devDependencies": {
"atool-build": "^0.7.6",
Expand Down

0 comments on commit 4bb6ab7

Please sign in to comment.