@shopify/react-form-state
Advanced tools
Comparing version 0.1.0 to 0.1.3
@@ -78,4 +78,4 @@ "use strict"; | ||
__decorate([ | ||
lodash_decorators_1.memoize, | ||
lodash_decorators_1.bind | ||
lodash_decorators_1.memoize(), | ||
lodash_decorators_1.bind() | ||
], List.prototype, "handleChange", null); | ||
@@ -82,0 +82,0 @@ return List; |
@@ -73,4 +73,4 @@ "use strict"; | ||
__decorate([ | ||
lodash_decorators_1.memoize, | ||
lodash_decorators_1.bind | ||
lodash_decorators_1.memoize(), | ||
lodash_decorators_1.bind() | ||
], Nested.prototype, "handleChange", null); | ||
@@ -77,0 +77,0 @@ return Nested; |
@@ -299,9 +299,9 @@ "use strict"; | ||
__decorate([ | ||
lodash_decorators_1.bind | ||
lodash_decorators_1.bind() | ||
], FormState.prototype, "submit", null); | ||
__decorate([ | ||
lodash_decorators_1.bind | ||
lodash_decorators_1.bind() | ||
], FormState.prototype, "reset", null); | ||
__decorate([ | ||
lodash_decorators_1.memoize | ||
lodash_decorators_1.memoize() | ||
], FormState.prototype, "getHandlersForField", null); | ||
@@ -308,0 +308,0 @@ return FormState; |
@@ -14,4 +14,4 @@ # FAQ | ||
As such the main difference in our solution is the explicit, declarative api. Form fields are given explicit handlers generated individually for each field and made available through a [render prop](https://reactjs.org/docs/render-props.html). To reduce boilerplate we've kept the generated `field` objects as easy to use as possible. Usually you can just splat them onto your inputs. We'll go into this in more detail in the [usage guide](/usage-guide.md). Creating handlers for each field instead of having one that you share or inject using a higher order component means we are fully type safe, with editor autocomplete able to show a developer exactly what fields are available, and compilation breaking when someone tries to use a field that doesn't exist. | ||
As such the main difference in our solution is the explicit, declarative api. Form fields are given explicit handlers generated individually for each field and made available through a [render prop](https://reactjs.org/docs/render-props.html). To reduce boilerplate we've kept the generated `field` objects as easy to use as possible. Usually you can just splat them onto your inputs. We'll go into this in more detail in the [usage guide](https://github.com/Shopify/quilt/tree/master/packages/react-form-state/docs/usage-guide.md). Creating handlers for each field instead of having one that you share or inject using a higher order component means we are fully type safe, with editor autocomplete able to show a developer exactly what fields are available, and compilation breaking when someone tries to use a field that doesn't exist. | ||
`<FormState />` also differs in that it's validation behavior is based around the [Polaris form validation guidelines](https://polaris.shopify.com/patterns/error-messages#section-form-validation) out of the box. This allows us to provide consistent feedback across all pages that use it without developers having to think about it. |
{ | ||
"name": "@shopify/react-form-state", | ||
"version": "0.1.0", | ||
"version": "0.1.3", | ||
"license": "MIT", | ||
@@ -26,4 +26,4 @@ "description": "Manage react forms tersely and type-safe with no magic.", | ||
"dependencies": { | ||
"lodash-decorators": "^6.0.0", | ||
"lodash-es": "^4.17.10" | ||
"lodash": "^4.17.10", | ||
"lodash-decorators": "^6.0.0" | ||
}, | ||
@@ -30,0 +30,0 @@ "peerDependencies": { |
# `@shopify/react-form-state` | ||
[![Build Status](https://travis-ci.org/Shopify/quilt.svg?branch=master)](https://travis-ci.org/Shopify/quilt) | ||
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE.md) [![npm version](https://badge.fury.io/js/%40shopify%2Freact-formwell.svg)](https://badge.fury.io/js/%40shopify%2Freact-formwell.svg) [![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/@shopify/react-formwell.svg)](https://img.shields.io/bundlephobia/minzip/@shopify/react-formwell.svg) | ||
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](LICENSE.md) [![npm version](https://badge.fury.io/js/%40shopify%2Freact-form-state.svg)](https://badge.fury.io/js/%40shopify%2Freact-form-state.svg) [![npm bundle size (minified + gzip)](https://img.shields.io/bundlephobia/minzip/@shopify/react-form-state.svg)](https://img.shields.io/bundlephobia/minzip/@shopify/react-form-state.svg) | ||
@@ -44,3 +44,3 @@ Manage react forms tersely and safely-typed with no magic. | ||
For detailed explanations of how to use `<FormState />` check out [the guide](/docs/building-forms.md). | ||
For detailed explanations of how to use `<FormState />` check out [the guide](https://github.com/Shopify/quilt/tree/master/packages/react-form-state/docs/building-forms.md). | ||
@@ -55,2 +55,2 @@ ### `validators` | ||
For detailed explanations of the validation uitilities, check out [the validation docs](/docs/validation.md). | ||
For detailed explanations of the validation utilities, check out [the validation docs](https://github.com/Shopify/quilt/tree/master/packages/react-form-state/docs/validation.md). |
@@ -152,3 +152,3 @@ import * as React from 'react'; | ||
@bind | ||
@bind() | ||
private async submit(event?: Event) { | ||
@@ -184,3 +184,3 @@ if (!this.mounted) { | ||
@bind | ||
@bind() | ||
private reset() { | ||
@@ -190,3 +190,3 @@ this.setState(createFormState(this.props.initialValues)); | ||
@memoize | ||
@memoize() | ||
private getHandlersForField(path: keyof FieldStates<Fields>) { | ||
@@ -193,0 +193,0 @@ return { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
122385
+ Addedlodash@^4.17.10
- Removedlodash-es@^4.17.10
- Removedlodash-es@4.17.21(transitive)