Skip to content
This repository was archived by the owner on May 7, 2022. It is now read-only.

Commit f38300d

Browse files
committed
优化react-router-dom导入方式
1 parent e04c5b4 commit f38300d

File tree

5 files changed

+6
-5
lines changed

5 files changed

+6
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"babel-runtime": "^6.26.0",
6969
"core-js": "^2.5.1",
7070
"fastclick": "^1.0.6",
71-
"history": "^4.6.1",
71+
"history": "^4.7.2",
7272
"http-proxy-middleware": "^0.17.4",
7373
"jroll": "^2.5.0",
7474
"preact": "^8.2.6",

src/App.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
import React from 'react'
22
import { connect } from 'react-redux'
33
import { bindActionCreators } from 'redux'
4-
import { Route, Router } from 'react-router-dom'
4+
import Router from 'react-router-dom/Router'
5+
import Route from 'react-router-dom/Route'
56
import CSSTransitionGroup from 'react-transition-group/CSSTransitionGroup'
67
import createHistory from 'history/createHashHistory'
78
const history = createHistory()

src/containers/Home/components/BookList.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Created by yongyuehuang on 2016/12/15.
33
*/
44
import React from 'react'
5-
import { Link } from 'react-router-dom'
5+
import Link from 'react-router-dom/Link'
66
import PropTypes from 'prop-types'
77

88
const BookList = (props) => {

src/containers/Home/components/Header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* Created by Administrator on 2016/7/1.
33
*/
44
import React from 'react'
5-
import { Link } from 'react-router-dom'
5+
import Link from 'react-router-dom/Link'
66
import PropTypes from 'prop-types'
77

88
const Header = (props) => {

src/containers/Search/components/Header.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*/
44
import React from 'react'
55
import PropTypes from 'prop-types'
6-
import { Link } from 'react-router-dom'
6+
import Link from 'react-router-dom/Link'
77

88
const back = require('./files/back_search.png')
99
const search = require('./files/search_1.png')

0 commit comments

Comments
 (0)