Skip to content
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
@wayung

Description

@wayung
// 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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions