DEV Community

Osman Zakir
Osman Zakir

Posted on

Still Nothing Rendering...

I fixed my unreachable code problem but I still have that other problem of nothing rendering.

I was also getting an "undefined" error on React itself, so I turned the script into an ES6 module and imported React which fixed that problem. But still nothing actually gets rendered.

And on CodePen, I get this error:

Uncaught TypeError: Cannot read property 'className' of undefined

on the line

Button.propTypes.className.isRequired();

Why is that?

Also note that on CodePen, changing it into a module wasn't needed.

Anyway, please help me out here as well. Thanks.

Top comments (1)

Collapse
 
terabytetiger profile image
Tyler V. (he/him)

The error indicates that className doesn't exist on your propTypes object.

If you link to the CodePen maybe someone can provide more clarification?