0

Can someone help me, please?

TypeError: Cannot read property 'getBoundingClientRect' of null

TypeError: Cannot read property 'getBoundingClientRect' of null

I'm rendering this code, for example:

<div className="box">Test</div>
User863
  • 19,346
  • 2
  • 17
  • 41

1 Answers1

0

Use class instead of className

Based on your update in the comment, you need to be using class and not className. className is a parameter passed to a react component, while class is the proper attribute for standard HTML elements.

John Pavek
  • 2,595
  • 3
  • 15
  • 33
  • I haven't heard of any differences between class and className like you said. Do you have a reference that I can take a look? I found this question and it doesn't align with your answer https://stackoverflow.com/questions/46989454/class-vs-classname-in-react-16 – hungdoansy Nov 16 '20 at 06:13