This repository was archived by the owner on Jul 19, 2019. It is now read-only.
This repository was archived by the owner on Jul 19, 2019. It is now read-only.
Lesson 05:Uncaught TypeError: Cannot read property 'createClass' of undefined #341
Open
Description
// App.js
import React from 'react'
import { Link } from 'react-router'
import NavLink from './NavLink'
export default React.createClass({
render() {
return (
<div>
<h1>React Router Tutorial</h1>
<ul role="nav">
<li><NavLink to="/about">About</NavLink></li>
<li><NavLink to="/repos">Repos</NavLink></li>
</ul>
{this.props.children}
</div>
);
}
})
// NavLink.js
import { React } from 'react'
import { Link } from 'react-router'
export default React.createClass({
render() {
return <Link {...this.props} activeClassName="active" />
}
})
Metadata
Metadata
Assignees
Labels
No labels