react native - Mobx Autorun running too often / need it to skip in some cases / run only after finished -


i know not best practice performant solution have found far. monitors object, , transforms object in autorun.

this setup working excellently small data sets, when there lot of changes, gets stuck in "100 cycles , didn't settle" error.

i wondering if there way iterate once / collate changes , apply them in 1 hit.

i have tried number of solutions / workarounds involve timers, deep object comparison (ie don't run if hasn't changed) etc, either disable autorun or lead extremely bad performance.

i guess in summary:

  • is there way make autorun not execute changes on same frame?
  • is there better solution autorun watch every observable in object?
  • is there way limit autorun?
  • is there better solution?

it hard useful without minimal code example of doing. sounds reading , modifying same data in autorun, introduces cycles. consider using reaction allows better separate data want listen react, versus action want take once change occurs


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

.htaccess - ERR_TOO_MANY_REDIRECTS htaccess -