if using React.createElement, it is a different results from babel, and will broken react-like lib.
why createElement fallback: react/react#20031 (comment)
TypeScript Version: 4.1.0-dev.20201015
Search Terms:
Code
/** @jsxImportSource preact */constkeyBeforeSpread=<spankey="a"{...props}/>constkeyAfterSpread=<span{...props}key="das"/>Expected behavior:
/** @jsxImportSource preact */import{jsx}from"preact/jsx-runtime"import{createElement}from"preact"constkeyBeforeSpread=jsx("span",Object.assign({},props),"a");constkeyAfterSpread=createElement("span",Object.assign({},props,{key: "das"}));Actual behavior:
/** @jsxImportSource preact */constkeyBeforeSpread=_jsx("span",Object.assign({},props),"a");constkeyAfterSpread=React.createElement("span",Object.assign({},props,{key: "das"}));Playground Link:
https://www.typescriptlang.org/play?ts=4.1.0-dev.20201015#code/PQKhAIAECsGcA8CSBbADgewE4BcDK6BXTAYwFNxVNSBDY7cEYAKCePQDtZ6BrUgTwBCpAGZZSuSjQAm4ALzgAPLFTV24Xn1kAialvABvAHTHK6VLAC+4YAD5WHLuv4BBYdlKYJVajNlKVakYmmGaWTppaUtSwerZAA
Related Issues:
if using
React.createElement, it is a different results from babel, and will broken react-like lib.why
createElementfallback: react/react#20031 (comment)TypeScript Version: 4.1.0-dev.20201015
Search Terms:
Code
Expected behavior:
Actual behavior:
Playground Link:
https://www.typescriptlang.org/play?ts=4.1.0-dev.20201015#code/PQKhAIAECsGcA8CSBbADgewE4BcDK6BXTAYwFNxVNSBDY7cEYAKCePQDtZ6BrUgTwBCpAGZZSuSjQAm4ALzgAPLFTV24Xn1kAialvABvAHTHK6VLAC+4YAD5WHLuv4BBYdlKYJVajNlKVakYmmGaWTppaUtSwerZAA
Related Issues: