React-native: Super expression must either be null or a function, not undefined

Change your import statement like below and try.

import React, { Component } from 'react';

import {
  AppRegistry,
  StyleSheet,
  Text,
  View,
  Image,
  TextInput,
  Button,
  TouchableHighlight,
} from 'react-native';

Also constructor should be like below

constructor(props){
    super(props);
}

I hit this error when attempting to use:

class Leaderboard extends React.component {

}

It should have been Component with a capital C!


I faced the same issue. Wrongly imported

import React, { Component } from "react-native";

instead of

import React, { Component } from "react";

see this answer https://stackoverflow.com/a/37676646/5367816