Posts

Showing posts with the label react-router

React JS routing not working (Uncaught TypeError: Super expression must either be null or a function, not object)

React JS routing not working (Uncaught TypeError: Super expression must either be null or a function, not object) I am developing a simple web application using React JS. I just started using React JS a few days ago. Now working on the routing part following a tutorial. But my code is not working. This is my entry js file. import React from 'react'; import { render } from 'react-dom'; import ListComponent from './list.component'; import AddItemComponent from './additem.component'; import AboutComponent from './about.component'; import { Router, Route, browserHistory } from 'react-router'; //Create class TodoComponent extends React.Component{ constructor(){ super() this.state = { todos : [ "Wash up", "Eat some KFC", "Take a long nap" ], age: 30 } } render(){ var ager = setTimeout(()=> { this.setState({ age: this.state.age + 3 }) }, 3000) return...