@shopify/react-form-state
Advanced tools
Comparing version 0.5.3 to 0.5.4
@@ -8,3 +8,4 @@ import * as React from 'react'; | ||
} | ||
export default class List<Fields> extends React.PureComponent<Props<Fields>, never> { | ||
export default class List<Fields> extends React.Component<Props<Fields>, never> { | ||
shouldComponentUpdate(nextProps: any): boolean; | ||
render(): JSX.Element[]; | ||
@@ -11,0 +12,0 @@ private handleChange; |
@@ -13,2 +13,9 @@ "use strict"; | ||
} | ||
List.prototype.shouldComponentUpdate = function (nextProps) { | ||
var _a = nextProps.field, nextValue = _a.value, nextError = _a.error, nextInitialValue = _a.initialValue; | ||
var _b = this.props.field, value = _b.value, error = _b.error, initialValue = _b.initialValue; | ||
return (nextValue !== value || | ||
nextError !== error || | ||
nextInitialValue !== initialValue); | ||
}; | ||
List.prototype.render = function () { | ||
@@ -56,3 +63,3 @@ var _this = this; | ||
return List; | ||
}(React.PureComponent)); | ||
}(React.Component)); | ||
exports.default = List; |
@@ -7,3 +7,4 @@ import * as React from 'react'; | ||
} | ||
export default class Nested<Fields> extends React.PureComponent<Props<Fields>, never> { | ||
export default class Nested<Fields> extends React.Component<Props<Fields>, never> { | ||
shouldComponentUpdate(nextProps: any): boolean; | ||
render(): React.ReactNode; | ||
@@ -10,0 +11,0 @@ private handleChange; |
@@ -13,2 +13,9 @@ "use strict"; | ||
} | ||
Nested.prototype.shouldComponentUpdate = function (nextProps) { | ||
var _a = nextProps.field, nextValue = _a.value, nextError = _a.error, nextInitialValue = _a.initialValue; | ||
var _b = this.props.field, value = _b.value, error = _b.error, initialValue = _b.initialValue; | ||
return (nextValue !== value || | ||
nextError !== error || | ||
nextInitialValue !== initialValue); | ||
}; | ||
Nested.prototype.render = function () { | ||
@@ -48,3 +55,3 @@ var _this = this; | ||
return Nested; | ||
}(React.PureComponent)); | ||
}(React.Component)); | ||
exports.default = Nested; |
{ | ||
"name": "@shopify/react-form-state", | ||
"version": "0.5.3", | ||
"version": "0.5.4", | ||
"license": "MIT", | ||
@@ -5,0 +5,0 @@ "description": "Manage react forms tersely and type-safe with no magic.", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
156580
3352