https://github.com/launchpadlab/lp-form
Extensions for the reduxForm HOC
https://github.com/launchpadlab/lp-form
Last synced: 10 months ago
JSON representation
Extensions for the reduxForm HOC
- Host: GitHub
- URL: https://github.com/launchpadlab/lp-form
- Owner: LaunchPadLab
- License: mit
- Created: 2017-08-07T16:00:43.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2025-03-05T07:55:40.000Z (12 months ago)
- Last Synced: 2025-03-21T17:23:00.243Z (11 months ago)
- Language: JavaScript
- Size: 454 KB
- Stars: 0
- Watchers: 21
- Forks: 1
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
[](https://badge.fury.io/js/%40launchpadlab%2Flp-form)
# lp-form
A drop-in replacemement for the [`reduxForm()`](https://redux-form.com/8.3.0/docs/api/reduxform.md/) Higher-Order Component from [redux-form](https://redux-form.com/) that adds extra options and functionality.
```jsx
import React from 'react'
import { compose } from 'recompose'
import { Field } from 'redux-form'
import { lpForm } from 'lp-form'
import { Input, SubmitButton } from 'lp-components'
function MyForm({ handleSubmit }) {
return (
Submit
)
}
export default compose(
lpForm({
name: 'MyForm',
// Constraints is a special option that adds validations to the form.
constraints: { name: { presence: true } },
})
)(MyForm)
```
All available options and enhancements can be found in the [documentation](#documentation).
## Documentation
Documentation and usage info can be found in [docs.md](docs.md).
## Migration Guides
- [v2.0.0](migration-guides/v2.0.0.md)
## Contribution
This package follows the Opex [NPM package guidelines](https://github.com/LaunchPadLab/opex/blob/master/gists/npm-package-guidelines.md). Please refer to the linked document for information on contributing, testing and versioning.