Super expression must either be null or a function, not undefined – Answer

I just got a mystery react error after coding along with a tutorial. That’s pretty common, but it was pretty hard for me to figure out what the error was talking about from the message. Cutting to the chase (and so I can look it up easily next time) you get an “Super expression must either be null or a function, not undefined” error if you type

class xxxx extends React.component {}

as opposed to

class xxxx extends React.Component {}

The difference is in the capital C. Don’t make my mistake, or if you do then you can fix it quickly!

Tell me what you think.

This site uses Akismet to reduce spam. Learn how your comment data is processed.