{"record":{"id":"8975b3f8f6debc63","repo":"withastro/astro","slug":"more-than-one-jsx-renderer-is-enabled-this-will-l-8975b3","errorCode":null,"errorMessage":"More than one JSX renderer is enabled. This will lead to unexpected behavior unless you set the `include` or `exclude` option. See https://docs.astro.build/en/guides/integrations-guide/react/#combining-multiple-jsx-frameworks for more information.","messagePattern":"More than one JSX renderer is enabled\\. This will lead to unexpected behavior unless you set the `include` or `exclude` option\\. See https://docs\\.astro\\.build/en/guides/integrations-guide/react/#combining-multiple-jsx-frameworks for more information\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/integrations/react/src/index.ts","lineNumber":203,"sourceCode":"\t\t\t\tupdateConfig({\n\t\t\t\t\tvite: getViteConfiguration(\n\t\t\t\t\t\t{ include, exclude, babel, experimentalReactChildren, experimentalDisableStreaming },\n\t\t\t\t\t\tversionConfig,\n\t\t\t\t\t),\n\t\t\t\t});\n\t\t\t\tif (command === 'dev') {\n\t\t\t\t\tconst preamble = FAST_REFRESH_PREAMBLE.replace(`__BASE__`, '/');\n\t\t\t\t\tinjectScript('before-hydration', preamble);\n\t\t\t\t}\n\t\t\t},\n\t\t\t'astro:config:done': ({ logger, config }) => {\n\t\t\t\tconst knownJsxRenderers = ['@astrojs/react', '@astrojs/preact', '@astrojs/solid-js'];\n\t\t\t\tconst enabledKnownJsxRenderers = config.integrations.filter((renderer) =>\n\t\t\t\t\tknownJsxRenderers.includes(renderer.name),\n\t\t\t\t);\n\n\t\t\t\tif (enabledKnownJsxRenderers.length > 1 && !include && !exclude) {\n\t\t\t\t\tlogger.warn(\n\t\t\t\t\t\t'More than one JSX renderer is enabled. This will lead to unexpected behavior unless you set the `include` or `exclude` option. See https://docs.astro.build/en/guides/integrations-guide/react/#combining-multiple-jsx-frameworks for more information.',\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t},\n\t\t},\n\t};\n}\n\n/**\n * @deprecated Import `getContainerRenderer` from `@astrojs/react/container-renderer` instead.\n */\nexport function getContainerRenderer(): AstroRenderer {\n\tconsole.warn(\n\t\t'[@astrojs/react] Importing `getContainerRenderer` from `@astrojs/react` is deprecated. Import it from `@astrojs/react/container-renderer` instead.',\n\t);\n\treturn getContainerRendererImpl();\n}\n","sourceCodeStart":185,"sourceCodeEnd":221,"githubUrl":"https://github.com/withastro/astro/blob/52e6c34790cc8ac4e69e6135ace06049867e5c4a/packages/integrations/react/src/index.ts#L185-L221","documentation":"The React integration runs the same astro:config:done check as the other JSX renderers: if more than one of @astrojs/react, @astrojs/preact, @astrojs/solid-js is registered and react() was configured without include/exclude, Vite has ambiguous JSX transform rules and this warning is emitted. JSX components may compile with the wrong factory (React.createElement vs h vs Solid) and fail at runtime.","triggerScenarios":" astro.config.mjs registers react() together with preact() or solid(), and the react() call has no include or exclude option; enabledKnownJsxRenderers.length > 1 in the astro:config:done hook.","commonSituations":" Dropping Preact or Solid components into a React codebase (or vice versa) during a migration; monorepo component libraries pulling in several renderer integrations; starter templates shipping all integrations by default.","solutions":["Pass include/exclude globs to each JSX integration so every framework owns a disjoint file set, e.g. react({ include: ['**/react/**'] }) and preact({ include: ['**/preact/**'] }).","Remove renderer integrations you do not actually use.","Restart astro dev / rerun astro build to re-evaluate the config hook and confirm the warning is gone."],"exampleFix":"// before\nexport default defineConfig({\n  integrations: [react(), preact()],\n});\n\n// after\nexport default defineConfig({\n  integrations: [\n    react({ include: ['**/react/**'] }),\n    preact({ include: ['**/preact/**'] }),\n  ],\n});","handlingStrategy":"validation","validationCode":"const jsxIntegrations = ['@astrojs/react', '@astrojs/preact', '@astrojs/solid-js'];\nconst enabled = config.integrations.filter((i) => jsxIntegrations.includes(i.name));\nif (enabled.length > 1 && !(reactOptions.include || reactOptions.exclude)) {\n  throw new Error('Multiple JSX renderers require include/exclude scopes on react()');\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Scope each JSX integration with include globs before adding a second framework.","Keep React components in dedicated folders so the include pattern stays stable.","Treat this warning as a runtime-failure precursor: wrong JSX transform throws in hydrated components."],"tags":["react","jsx","multiple-frameworks","config","integrations"],"backgroundTag":"conflicting-jsx-renderers","analyzedSha":"52e6c34790cc8ac4e69e6135ace06049867e5c4a","analyzedAt":"2026-08-18T18:48:03.901Z","contentChangedAt":"2026-08-18T18:48:03.901Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}