Error – TypeError: Cannot set property ‘props’ of undefined

This is a common error faced by beginners and everyone else writing code in ReactJS. This error comes up when set of parenthesis are applied after Component, like Component( ).

class Dashboard extends Component { //Correct
class Dashboard extends Component () {} //Wrong

Happy Coding!

Published by Jayesh

I code and energize, loves sharing my journey.

One thought on “Error – TypeError: Cannot set property ‘props’ of undefined

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s