What kind of issue is this?
Link to repro
https://playground.react.dev/#N4Igzg9grgTgxgUxALhASwLYAcIwC4AEASggIZyEBmMEGBA5DGRfQNwA6AdnBJ2IQCNSYBAQC8DACZoAbmy5cefQgBUE-AMK0cnBJzzJizPADoAYhvEEAFAEpxAPgLAuBAkv4Et2K0JEdONyY8WECAHm8sAHoHLgBfAK4EAA8cfAJJBEpSKAAbKihuPDReAgAJWgQ7Z1cCYNCCMLVNbV49Qhj4rhAAGhAlSjQAcxR0bFxCPABPLFFgAgAFXKghtE4AeSxi3jACOIJqWgYhAQRcgFosZdXOc6ZyPHOebDRchBgo6X55Ti5rF0CBCiUWeWFepG2nAAshBMoZ2CBSLlcgj4gQwBC0GBBupFtc1ptIWBbKxeuAABYQADuAEl9O9OEiwChsrkRHEgA
Repro steps
Given this input:
import React from 'react';
const base = 'div';
const TestComponent: React.FC = () => {
const Comp = base;
return <Comp/>
};
export default function Home() {
return <TestComponent />
}
The compiler outputs this for the TestComponent
const TestComponent: React.FC = () => {
const $ = _c(1);
let t0;
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
t0 = <base />;
$[0] = t0;
} else {
t0 = $[0];
}
return t0;
};
First reported here: vercel/next.js#86728
This outputs a <base /> tag instead of a div.
I searched on issues before posting, but I couldn't find other reports.
How often does this bug happen?
Every time
What version of React are you using?
Next.js' version on 16.0.6
What version of React Compiler are you using?
1.0.0
What kind of issue is this?
Link to repro
https://playground.react.dev/#N4Igzg9grgTgxgUxALhASwLYAcIwC4AEASggIZyEBmMEGBA5DGRfQNwA6AdnBJ2IQCNSYBAQC8DACZoAbmy5cefQgBUE-AMK0cnBJzzJizPADoAYhvEEAFAEpxAPgLAuBAkv4Et2K0JEdONyY8WECAHm8sAHoHLgBfAK4EAA8cfAJJBEpSKAAbKihuPDReAgAJWgQ7Z1cCYNCCMLVNbV49Qhj4rhAAGhAlSjQAcxR0bFxCPABPLFFgAgAFXKghtE4AeSxi3jACOIJqWgYhAQRcgFosZdXOc6ZyPHOebDRchBgo6X55Ti5rF0CBCiUWeWFepG2nAAshBMoZ2CBSLlcgj4gQwBC0GBBupFtc1ptIWBbKxeuAABYQADuAEl9O9OEiwChsrkRHEgA
Repro steps
Given this input:
The compiler outputs this for the
TestComponentFirst reported here: vercel/next.js#86728
This outputs a
<base />tag instead of adiv.I searched on issues before posting, but I couldn't find other reports.
How often does this bug happen?
Every time
What version of React are you using?
Next.js' version on 16.0.6
What version of React Compiler are you using?
1.0.0