Skip to content
This repository was archived by the owner on Jul 19, 2019. It is now read-only.

Uncaught TypeError: Cannot read property 'getCurrentLocation' of undefined #265

Closed
charleylla opened this issue Nov 27, 2016 · 1 comment

Comments

@charleylla
Copy link

charleylla commented Nov 27, 2016

When I run a react-router demo in browser,it reports an error like this:
Uncaught TypeError: Cannot read property 'getCurrentLocation' of undefined
what caused this proble? the version? my codes are like this:
main.js:
import React from "react"; import ReactDOM from "react- import {Router,Route,hashHistory,IndexRoute} from "react-router"; import App from "./Components/App"; ReactDOM.render((<Router hsitory={hashHistory}> <IndexRoute component={App} /> <Route path="/" component={App} /> </Router> ),document.querySelector("#app"));
./Components/App/index.jsx
const APP = React.createClass({ render(){ return( <div> <button>首页</button> {this.props.children} </div> ); } }); export default APP;

Thank you very much!

@charleylla
Copy link
Author

I found out the problem,it's should be 'history' while I typed as 'hsitory'.

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

1 participant