Failed to set an indexed property on ‘CSSStyleDeclaration’: Index property setter is not supported

The root cause of this issue is described here. Essentially this happens when you pass style property of some elemnt as string or array. Like style="string" or style={[array]}. This may seem not relevant (I don’t think that someone intentionally try to send string or Array to style property), but in my case this was root cause.

To find error I recommend to carefully investigate your code with debugger in Chrome or other browser.

Below is example of my error

enter image description here

I erroniously set styles.radioButton (which is used as value for style property for some element) using spread operator ...spacing.xxSmall, but spacing.xxSmall is just a string and spreaded to array with chars as array members. Previously properties with indexes (0, 1, 2, …) of style has been ignored, but now site is crushed.

Leave a Comment