https://velog.io/@lillynextdoor/class-vs.-className
Why className instead of class??
-
In HTML, it is generally common to use
class, but in React,classis a reserved word in JavaScript, soclassNamemust be used to distinguish it fromclass. -
HTML is, literally, used to implement text, whereas JS/JSX is JavaScript that supports HTML. Therefore,
classNameis used this way to prevent conflicts with reserved words.