Skip to content
This repository has been 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
wayung opened this issue Mar 5, 2019 · 0 comments

Comments

@wayung
Copy link

wayung commented Mar 5, 2019

// 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" />
	}
})

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