alibaba-fusion / next

🦍 A configurable component library for web built on React.
https://fusion.design
MIT License
4.58k stars 584 forks source link

[Table]locale with jsx in it will lead to js error #1132

Closed justnewbee closed 5 years ago

justnewbee commented 5 years ago

Component

Table

Reproduction link

http://riddle.alibaba-inc.com/riddles/36db2f88

Steps to reproduce

import table from fusion 1.6-1.7,<= 1.5 is fine

render a table with locale, which contains a key with jsx like below

locale: {
  empty: <span>BUGGY!!!!!!!!!</span>
}

and you will get error when rendering this table

Firefox says: 「TypeError: "$$typeof" is read-only」 Chrome says: 「Uncaught TypeError: Cannot assign to read only property '$$typeof' of object '#'」

image

image

justnewbee commented 5 years ago

i assume this is no table bug, should be a common issue, please fix it and you might need to re-write the whole project using ts, which might save you tons of bugs to be honest, fusion regression bugs are too many, which gives me headache..