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

formula-one

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

formula-one - npm Package Compare versions

Comparing version 0.9.3 to 0.9.4

4

CHANGELOG.md
# Changelog
### v0.9.4
- Bump some dependency versions
### v0.9.3

@@ -4,0 +8,0 @@

2

package.json
{
"name": "formula-one",
"version": "0.9.3",
"version": "0.9.4",
"description": "Strongly-typed React form state management",

@@ -5,0 +5,0 @@ "author": "Zach Gotsch",

@@ -165,4 +165,4 @@ # formula-one

import {FeedbackStrategies} from "formula-one";
const {Changed, Submitted, or} = FeedbackStrategies;
const myStrategy = or(Changed, Submitted);
const {Changed, Blurred, Submitted, or, and} = FeedbackStrategies;
const strategy = or(and(Changed, Blurred), Submitted);
```

@@ -534,13 +534,15 @@

render() {
<div>
<Form
ref={f => {
this.form = f;
}}
onSubmit={handleSubmit}
>
{link => <UserField link={link} />}
</Form>
<button onClick={this.handleSubmitClick}>Submit</button>
</div>;
return (
<div>
<Form
ref={f => {
this.form = f;
}}
onSubmit={handleSubmit}
>
{link => <UserField link={link} />}
</Form>
<button onClick={this.handleSubmitClick}>Submit</button>
</div>
);
}

@@ -553,1 +555,7 @@ }

<!-- #### Disjoint union -->
## Frequently Asked Questions
### Is it possible to reset a form to a new initial state?
Normally, after the initial render, a `<Form>` component will ignore changes to its `initialState` prop. This is necessary because the `<Form>` component tracks metadata in addition to the any updates to the value of the form, and it must maintain that data as the user edits the form. If you want to start over with a new initial state and count all fields as unchanged and unblurred, you can provide a `key` prop to your `<Form>`. When this `key` changes, React will discard the state of your form and `<Form>` will be initialized with the provided `initialState`.
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