question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot read property 'displayName' of undefined

See original GitHub issue

i am getting undefined error on itemComponent. the code from view.jsx

`const componentName = itemComponent.type.displayName || itemComponent.type.name;`

if you can explain MyMasonryItem class it would be really helpful right now

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
artndes9commented, Jun 30, 2018

@matthiaskaemi there is an example in the file Link

1reaction
coleturnercommented, Jul 2, 2018

@matthiaskaemi you can use whatever properties you like so long as they fit the shape of the props expected by MyMasonryItem or whatever you prefer to call it 😃

Side note: this issue has run it’s course. Folks please feel free to open a separate issue

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'displayName' of undefined · Issue #7390
In my case it was because I imported the component as a named import instead of default import. So I fixed it from...
Read more >
Storybook cannot read property 'displayName' of undefined
Apparently, I was importing a Navbar, my component's name is Header. Also there is a difference between export default function () {} and...
Read more >
How to fix the error “Cannot read property 'displayName' of ...
The other day, I got the error “Cannot read property 'displayName' of undefined” in my project. The specs of my project are as...
Read more >
storybook cannot read properties of undefined ... - You.com
The TypeError : Cannot read properties of undefined (reading 'type') exception occurs in storybook when one defines the argTypes in the default export...
Read more >
Cannot read property 'displayName' of undefined
Hi. happens in quite all of my flows,. Flow ID 708c7cf1-1bb2-4dfb-bcbc-3326b33c75c1. Flow ID 9dedfade-9002-4ec6-88a7-9f3ceceb0577.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found