Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hypersoftllc/qc-redux-form_utils
A set of utilities for working with `redux-form`.
https://github.com/hypersoftllc/qc-redux-form_utils
Last synced: 28 days ago
JSON representation
A set of utilities for working with `redux-form`.
- Host: GitHub
- URL: https://github.com/hypersoftllc/qc-redux-form_utils
- Owner: hypersoftllc
- License: isc
- Created: 2018-01-22T01:14:15.000Z (about 7 years ago)
- Default Branch: develop
- Last Pushed: 2018-01-22T03:45:10.000Z (about 7 years ago)
- Last Synced: 2024-12-18T21:46:47.818Z (about 2 months ago)
- Language: JavaScript
- Size: 44.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# qc-redux-form_utils
[![Build Status][travis-svg]][travis-url]
[![Coverage Status][coverage-image]][coverage-url]
[![License][license-image]][license-url]
[![Downloads][downloads-image]][downloads-url][![npm badge][npm-badge-png]][package-url]
A set of utilities for working with `redux-form`.
## Installation
```sh
npm install --save qc-redux-form_utils
```or
```sh
yarn add qc-redux-form_utils
```## Example Usage
```js
import FormUtils from 'qc-dom_utils/form'
import { flattenErrors } from 'qc-redux-form_utils'
...const FORM_NAME = 'MyForm'
class MyForm extends React.Component {
...
render() {
return (
...
)
}
...
}const ReduxAwareForm = reduxForm({
name: FORM_NAME,
...
onSubmitFail: (errors, dispatch, submitError, props) => {
let flattenedErrors = flattenErrors(errors)
FormUtils.focusFirstInvalid(FORM_NAME, flattenedErrors)
},
...
})(MyForm)
```[coverage-image]: https://coveralls.io/repos/github/hypersoftllc/qc-redux-form_utils/badge.svg?branch=master
[coverage-url]: https://coveralls.io/github/hypersoftllc/qc-redux-form_utils?branch=master
[downloads-image]: http://img.shields.io/npm/dm/qc-redux-form_utils.svg
[downloads-url]: http://npm-stat.com/charts.html?package=qc-redux-form_utils
[license-image]: http://img.shields.io/npm/l/qc-redux-form_utils.svg
[license-url]: LICENSE
[npm-badge-png]: https://nodei.co/npm/qc-redux-form_utils.png?downloads=true&stars=true
[package-url]: https://npmjs.org/package/qc-redux-form_utils
[travis-svg]: https://travis-ci.org/hypersoftllc/qc-redux-form_utils.svg?branch=master
[travis-url]: https://travis-ci.org/hypersoftllc/qc-redux-form_utils