Skip to content

Instantly share code, notes, and snippets.

@mohanmca
Forked from jmarceli/README.md
Last active May 14, 2016 14:09
Show Gist options
  • Save mohanmca/38ba0cfae9ead18ee92b728cc9e43d48 to your computer and use it in GitHub Desktop.
Save mohanmca/38ba0cfae9ead18ee92b728cc9e43d48 to your computer and use it in GitHub Desktop.
React errors explained

1

You will get one of these:

Uncaught (in promise) TypeError: Cannot read property 'toUpperCase' of undefined(…)

ReactCompositeComponent.js:870 Uncaught TypeError: Cannot read property 'displayName' of undefined

if you try to:

import { ComponentName } from 'ComponentName.jsx'

instead of:

import ComponentName from 'ComponentName.jsx'

2

This error:

Uncaught TypeError: Cannot read property 'toUpperCase' of undefined

might be caused by importing:

import { Link } from 'redux-router'

instead of

import { Link } from 'react-router'

3

Performance problems might be caused by 'redux-logger' and 'redux-devtools' packages.

Remove them from production build!

4

index_bundle.js:9077 Warning: Failed propType: Invalid prop `component` supplied to `IndexRoute`.

Standardize import module.exports = Component should become export default Component.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment