react-form
Advanced tools
Comparing version 3.0.0-beta.3 to 3.0.0-beta.4
@@ -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 @@ |
@@ -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", |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
216919
4358
0
2