I ran into this code recently: https://playground.solidjs.com/?hash=-743945147&version=1.3.9; notice due to how mergeProps and Dynamic work, the textarea is recreated whenever props.value changes. There are a few areas where compilation is broken or could be better with regards to inline objects:
This is obviously quite specific to spreading objects declared inline, since no transformations will be done to explicit mergeProps calls or when spreading objects declared elsewhere.
When spreading an object with computed keys, the object is wrongly assumed to be static and transformed as such.
Reproduction
Expected
I ran into this code recently: https://playground.solidjs.com/?hash=-743945147&version=1.3.9; notice due to how
mergeProps
andDynamic
work, the textarea is recreated wheneverprops.value
changes. There are a few areas where compilation is broken or could be better with regards to inline objects:Bugs:
Possible improvements:
This is obviously quite specific to spreading objects declared inline, since no transformations will be done to explicit
mergeProps
calls or when spreading objects declared elsewhere.