$freeze/$once returning reactive value and preventing in-place updates of it #51
-
Hi! I'm wondering if it is possible to render value of some x-data expression or prop in it's current state for that moment, and keep it without updates. Probably it would be better to have it as modifier for x-bind prop. This would be helpful mostly for values based on iteration in x-for loops that cannot relay on simple index (i.e. to simplify logic in multiple nested x-for loops). Or maybe there already exist some good solution for that particular problem? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
You can store the current state easily enough with something like Can you expand on the example case a bit more? I'm not necessarily following it but interested to hear more. |
Beta Was this translation helpful? Give feedback.
You can store the current state easily enough with something like
$el.__x.getUnobservedData()
(demo)Can you expand on the example case a bit more? I'm not necessarily following it but interested to hear more.