Learn more  » Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Bower components Debian packages RPM packages NuGet packages

skava / @skava/ui   js

Repository URL to install this package:

Version: 2.8.8 

Form

FormState

  • this handles validation (alongside InputState, needs de-duplication)
  • the value of any input can be gotten from here
  • this is the state for the entire form
  • this is an observable container
  • extend it and pass in the inputsList to convert a list of vanilla js inputs into ObservableInputs

ObserverForm

  • this uses 1 FormState
  • this is the React.Component that handles the lifecycle events, and calls the FormState
  • this is super bloated, it has things for classNames, Form, Wrappers, Inputs
  • this provides a host of lifecycle methods that are extendable
    • validateInputItem
    • validateForm
    • onSubmitValid
    • onSubmitError
    • handleSubmit
    • handleCancel
    • renderInput
    • onPrefil
    • onInputInit
    • renderInputList

Example

  1. @todo
  2. link to tests
  3. link to stories
  4. link to typings

TODO

  • convert to renderProps
  • need to finish the typings
  • cleanup and dedupe