Skip to main content
100%

requirebin sketch

✓ Published0🌍 Public
HHypercubed
Last edited Sep 25, 2016
Created on Sep 25, 2016

This example demonstrates two MobX patterns for managing derived state in a React application. It shows how `mobx.observable` creates reactive state objects, while `mobx.autorun` automatically tracks dependencies and re-runs a "someReallyExpensiveTest" function whenever the input changes. The visualization contrasts an imperative approach using `autorun` with a declarative approach using computed getters that chain `isBoolean` and `isString` properties. Console output logs state transitions as inputs toggle between booleans and strings, highlighting MobX's reactivity model.

AI-generated description

Similar vizzes