Why Does React Throw Errors with Raw SVG?
In React, JSX is syntactic sugar for JavaScript objects. Browsers throw DOM warnings when attributes use kebab-case instead of camelCase conventions (e.g. stroke-width must be strokeWidth).
Crucial JSX Conversions
stroke-width➡️strokeWidthstroke-linecap➡️strokeLinecapfill-rule➡️fillRuleclass➡️classNamecurrentColor颜色继承:UsingcurrentColorlets the icon inherit CSS font color classes seamlessly.