Debounce observer like autorunasync in mobx
To my understanding, observer wraps the render method in react with autorun and automatically re-renders as observables are changed. AutorunAsync has a debouncing option. Wrapping render around autorunasync when an option is specified so observable changes can be debounced and render after some specified interval.
Is there already an existing solution to debouncing react observers?
Example:
@observe(16) //debounce 16ms
class ReactElement extends Component {...}
What benefit would that yield? Do you have a real life usecase for such a scenario?
Op zo 12 feb. 2017 om 00:26 schreef Chris Kwong [email protected]:
To my understanding, observer wraps the render method in react with autorun and automatically re-renders as observables are changed. Can an option be implemented such that we can debounce the observables and only render after some specified interval.
@observe(16) //debounce 16ms class ReactElement extends Component {...}
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/mobxjs/mobx-react/issues/203, or mute the thread https://github.com/notifications/unsubscribe-auth/ABvGhM7QxT1mG17v1IkkhSjT0Gd9tl5lks5rbkO4gaJpZM4L-VXL .
https://github.com/mobxjs/mobx-react/issues/533