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    
  ..
  FormState.tsx
  ObserverForm.tsx
  README.md
  _elements.tsx
  deps.ts
  fixture.ts
  index.ts
  styled.tsx
  typings.ts
Size: Mime:

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