react中报错Failed to set an indexed property on 'CSSStyleDeclaration': Index property setter is not supported

产生这个报错的原因是我当时将样式写到了less文件,我在div中使用的使用应该是使用className = ,而我误写了一个style = 。style里面当然没有自定义的className,所以产生报错,举个例子,你的className叫mycontent,自然style里面不会有的。所以报错,遇到此报错细心查找一下即可。