简体   繁体   中英

Does "changing and reverting back observable within the same action" trigger updates? (mobX)

If observable was changed several times within the same action and as result, the observable value equals the initial value (before the action) - does this trigger mobX observable updates?

I've just tested this - yes, this triggers mobx observable updates. React components are re-rendered, so the observable is treated as changed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM