mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
Consider the following code:
```tsx
import { FC } from 'react'
import { SvgIcon } from '@mui/material'
const StyledIcon = <SvgIcon sx={{ padding: 1, color: '#ff0000' }} />
// reported violation ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
export const MyComponent: FC = () => {
return (
<div>
{StyledIcon}
{/* ... */}
</div>
)
}
```
This should not be a violation since the JSX is pre-computed and re-used, which
does not break React's `Object.is()` checks.
|
||
|---|---|---|
| .. | ||
| examples | ||
| fixtures | ||
| src | ||
| tests | ||
| Cargo.toml | ||
| CHANGELOG.md | ||