Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
import { observer } from 'xmobx/mobx-react'
import { action, observable } from 'xmobx/mobx'

class ShippingAddressFormState {
  @observable shippingAddress = {}

  @action
  setShippingAddressForm(form) {
    this.shippingAddress = form
    console.log('[Shipping Address] setShippingAddressForm()', this)
  }

  @action.bound
  const handleShippingAddressFormBlur = () => {
    const isValidForm = this.shippingAddress.validateForm()
    // console.log('[Shipping Address] hasAllValidInputs: ', isValidForm)
    if (isValidForm === true) {
      console.log('[Shipping Address] onBlur serialized data', this.shippingAddress.state.toSerialized())
    }
  }
}

// Object Creation
const shippingAddressFormState = new ShippingAddressFormState()

export { shippingAddressFormState }
export default shippingAddressFormState