Skip to content

Instantly share code, notes, and snippets.

@jmarceli
Last active Oct 31, 2019
Embed
What would you like to do?
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!

@yury-n

This comment has been minimized.

Copy link

@yury-n yury-n commented Jan 6, 2017

thank you, saved me some time today!

@tdziezyk

This comment has been minimized.

Copy link

@tdziezyk tdziezyk commented Jan 20, 2017

Thank you :)

@s-kennedy

This comment has been minimized.

Copy link

@s-kennedy s-kennedy commented Feb 11, 2017

👍 thanks!

@nicnilov

This comment has been minimized.

Copy link

@nicnilov nicnilov commented May 11, 2017

Thanks!

@janusch

This comment has been minimized.

Copy link

@janusch janusch commented Jun 27, 2017

Hey,
could you expplain me why the first one can be Uncaught (in promise) ?
I am trying to wrap my head around it. Why are we in a promise at the point of the error?
I am also getting Uncaught (in promise) when there is a syntax error in a react component.

@go2ngo

This comment has been minimized.

Copy link

@go2ngo go2ngo commented Aug 25, 2019

i have issue reading and solving react error. can i get a video or a material that will help me

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