function reactTo (triggerFn, effectFn) {
  // note -- had issues with cyclical reactions in the past
  // the comments below will fix them if they come up again
  // DO NOT REMOVE THEM

  // function restartReaction() {
  reaction(
    triggerFn,
    (data, action) => {
      // action.dispose() // clear this "listener" so we don't cycle

      effectFn(data, action)

      // restartReaction() // restart the reaction after doing stuff to the data
    }
  )
  // }

  // restartReaction()
}
A short-hand function for creating reactions with protections against cyclical errors.

@param {Function} triggerFn   A function that determines when fire the effectFn and what to pass to the effectFn.
@param {Function} effectFn   The side-effect to run when the data tracked by the triggerFn is changed.

A note on MobX reactions: the side effect will "only react to data that was accessed in the data expression" and will only fire "when the data returned by the expression has changed". (https://mobx.js.org/refguide/reaction.html)