Skip to content

Demo of how we can use builtin React api to create a HOC to manage forms

Notifications You must be signed in to change notification settings

Aupajo/lightweight-react-form-demo

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project was bootstrapped with Create React App.

Form controls using "Vanilla React"

redux-form is popular but it's super heavy, and we possibly don't need it. This is a demo of how we can leverage the default API's in react. This demo is using React 16.8 and it's new context api

  • Simple form with input feeding into form state with minimal boilerplate
  • Form with lots of inputs, so can see how it performs. Although i haven't done any real performance testing
  • Form with custom onChange events

TODO, exercises for the reader

  • Validations, using the browsers checkValidity function

  • Controlled inputs, via render props? (Context isn't suited to high frequency updates)

About

Demo of how we can use builtin React api to create a HOC to manage forms

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 60.3%
  • CSS 20.4%
  • HTML 19.3%