If you’re finding janky animations or renders with elements when using reflexes with self-referential data-reflex-root
, wrap the children of your root element in a div/span
This helps morphdom…morph
Janky:
<div id='some-id' data-reflex-root='#some-id'>
some text
<input data-reflex= 'click->SomeReflex#some_action'>..</div>
</div>
Not janky
<div id='some-id' data-reflex-root='#some-id'>
<div>
some text
<input data-reflex= 'click->SomeReflex#some_action'>..</div>
</div>
</div>
YMMV
Top comments (0)