New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-form

Package Overview
Dependencies
Maintainers
2
Versions
122
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-form - npm Package Compare versions

Comparing version 3.0.0-beta.3 to 3.0.0-beta.4

5

CHANGELOG.md

@@ -7,6 +7,3 @@ # 3.0.0

- Added a new `FormApi` render-prop component and companion `withFormApi` HOC which allow you to access the nearest formApi ancestor from anywhere in your component tree.
- Added `pure` prop to `Form`, `Field` and `withField` components. While using the `pure` prop, the `Field` instance will only rerender when form state or shallow prop values change. Use this to increase performance on large forms as long as you are aware of its implications.
- The api supplied by `Field`/`withField` now contains field-level methods for `addValue`, `removeValue`, and `swapValue`.
- Added `pure` prop to `Form`, `Field` and `withField` components. While using the `pure` prop, the `Field` instance will only rerender when form state or shallow prop values change. Use this to increase performance on large forms. By default this prop is true. Set it to false to deactivate the Optimization (rare cases).
- `NestedField`/`withNestedField` is a new component that is replacing and deprecating the `NestedForm` components. `NestedField` allows you to set a new field context for any child `Field` and `FormApi` components. This allows for extremely implicit field declarations within components without having to worry about form composition.

@@ -13,0 +10,0 @@

10

es/components/Field.js

@@ -80,3 +80,3 @@ 'use strict';

var nextFormState = nextContext.formState;
var pure = nextProps.pure || nextContext.formProps.pure;
var pure = nextProps.pure && nextContext.formProps.pure;

@@ -233,2 +233,10 @@ // When pure, we need to check props and form state to determine if we

Field.propTypes = process.env.NODE_ENV !== "production" ? {
field: _propTypes2.default.string.isRequired
} : {};
Field.defaultProps = {
pure: true
};
exports.default = Field;

@@ -669,3 +669,7 @@ 'use strict';

formProps: _propTypes2.default.object
};
Form.defaultProps = {
pure: true
/* ---------- Container ---------- */

@@ -672,0 +676,0 @@

@@ -80,3 +80,3 @@ 'use strict';

var nextFormState = nextContext.formState;
var pure = nextProps.pure || nextContext.formProps.pure;
var pure = nextProps.pure && nextContext.formProps.pure;

@@ -233,3 +233,11 @@ // When pure, we need to check props and form state to determine if we

Field.propTypes = process.env.NODE_ENV !== "production" ? {
field: _propTypes2.default.string.isRequired
} : {};
Field.defaultProps = {
pure: true
};
exports.default = Field;
module.exports = exports['default'];

@@ -669,3 +669,7 @@ 'use strict';

formProps: _propTypes2.default.object
};
Form.defaultProps = {
pure: true
/* ---------- Container ---------- */

@@ -672,0 +676,0 @@

{
"name": "react-form",
"version": "3.0.0-beta.3",
"version": "3.0.0-beta.4",
"description": "React Form is a lightweight framework and utility for building powerful forms in React applications.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

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