Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@shopify/react-form-state

Package Overview
Dependencies
Maintainers
10
Versions
146
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@shopify/react-form-state - npm Package Compare versions

Comparing version 0.2.4 to 0.2.5

11

dist/FormState.js

@@ -163,3 +163,3 @@ "use strict";

return __awaiter(this, void 0, void 0, function () {
var onSubmit, _a, formData, mounted, result;
var onSubmit, _a, formData, mounted, errors;
return __generator(this, function (_b) {

@@ -182,6 +182,9 @@ switch (_b.label) {

case 1:
result = _b.sent();
if (result) {
this.updateRemoteErrors(result);
errors = _b.sent();
if (!mounted) {
return [2 /*return*/];
}
if (errors) {
this.updateRemoteErrors(errors);
}
this.setState({ submitting: false });

@@ -188,0 +191,0 @@ return [2 /*return*/];

@@ -527,3 +527,3 @@ # Building forms with FormState

validateList,
validateObject,
validateNested,
arrayUtils,

@@ -565,3 +565,3 @@ } from '@shopify/react-form-state';

sku: lengthMoreThan(3, 'Must be longer than 3 characters'),
firstVariant: validateObject({
firstVariant: validateNested({
option: required('required'),

@@ -568,0 +568,0 @@ price: numericString('value must be numeric'),

{
"name": "@shopify/react-form-state",
"version": "0.2.4",
"version": "0.2.5",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "Manage react forms tersely and type-safe with no magic.",

@@ -169,7 +169,12 @@ import * as React from 'react';

const result = await onSubmit(formData);
if (result) {
this.updateRemoteErrors(result);
const errors = await onSubmit(formData);
if (!mounted) {
return;
}
if (errors) {
this.updateRemoteErrors(errors);
}
this.setState({submitting: false});

@@ -176,0 +181,0 @@ }

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc