# react-core-linter: static-jsx URL: https://generaltranslation.com/en-US/docs/react-core-linter/rules/static-jsx.mdx --- title: static-jsx description: The component must only have static children --- ## Overview Ensures that dynamic content inside [``](/docs/react/api/components/t) components is wrapped in variable components. This rule flags dynamic content that appears directly inside [``](/docs/react/api/components/t) components without being wrapped in appropriate variable components like [``](/docs/react/api/components/var) or [``](/docs/react/api/components/branch). ## Auto-fix Running `eslint --fix` will automatically wrap dynamic content: - **Ternaries / logical AND** → [``](/docs/react/api/components/branch) - **Other expressions** → [``](/docs/react/api/components/var) - **Missing imports** are added automatically ```jsx // Before fix Hello {userName}! {role === "admin" ? "Administrator" : role === "editor" ? "Editor" : "Viewer"} {isOnline && "Online"} // After fix Hello {userName}! Viewer ``` ## Reference ### Options | Option | Type | Default | Description | |--------|------|---------|-------------| | `libs` | `string[]` | `["gt-react", "gt-next", "gt-react-native", "gt-i18n", "@generaltranslation/react-core"]` | Array of library modules to check for translation components | --- ## Configuration ```json { "@generaltranslation/react-core-linter/static-jsx": ["error", { "libs": ["gt-react", "gt-next", "gt-react-native"] }] } ```