foxhound87 / mobx-react-form

Reactive MobX Form State Management
https://foxhound87.github.io/mobx-react-form
MIT License
1.09k stars 129 forks source link

using form properties in computed props #574

Closed mogadanez closed 2 years ago

mogadanez commented 3 years ago

https://codesandbox.io/s/form-quickstart-forked-5qm1s

trying to use form props in computed props, but value is not refreshed.

get sumbitingOrValidating() {
    return this.form.submitting || this.form.validating;
  }
foxhound87 commented 2 years ago

you have to

import { observer } from "mobx-react";

and use it on your component

https://codesandbox.io/s/form-quickstart-forked-vxfdu9