You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, setElementText method is marked as necessary. However, it's quite common for desktop ui that cannot perform setText on widget. Instead, text would be a dedicate widget. As this method could be emulated via other methods, allowing it be optional would be helpful.
<text> abc </text>
will results createElement, setElementText(abc)
<text> abc {1} </text>
will results createElement, createText(abc), insert, createText(1), insert
The latter one tries to add children to a text, while text is supposed to be the leaf. If I do want to properly implement the custom render options, I'll have to create a dedicate text node, and each element shall manage a possible text node. It is quite complex. Currently, I've hacked the jsxs in jsx-runtime to manually join the children if type is text, which isn't really a good choice.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Currently,
setElementTextmethod is marked as necessary. However, it's quite common for desktop ui that cannot performsetTexton widget. Instead, text would be a dedicate widget. As this method could be emulated via other methods, allowing it be optional would be helpful.will results createElement, setElementText(abc)
will results createElement, createText(abc), insert, createText(1), insert
The latter one tries to add children to a text, while text is supposed to be the leaf. If I do want to properly implement the custom render options, I'll have to create a dedicate text node, and each element shall manage a possible text node. It is quite complex. Currently, I've hacked the
jsxsin jsx-runtime to manually join the children if type istext, which isn't really a good choice.Beta Was this translation helpful? Give feedback.
All reactions