I want to achieve an effect similar to two-way data binding, but Mini Program is a typical one-way data binding, so I add a layer of binding manually and find that stutter is obvious, for example:
1, there is an input
<input value={{n}} bindinput="changeN">
I assign the input value to n in changeN. If I type it too fast, it will stutter
.2, for example, if there is a scroll, I want to achieve the effect of clicking the button to scroll to the top
<scroll-view scroll-top="{{y}}" bindscroll="changeY"></scroll-view>
when I was scrolling, I also assigned the current scroll-top to y, which made it even more painful, and the scroll bar began to jump blindly.
there may be serious mistakes in the thinking or writing of my two examples, so I would like to ask you how to solve this problem