final-form / final-form/react-final-form
app crushes when any prop from FormState is passed as a prop to FormProps
- Dominant language
- JavaScript
- Stars
- 7.4k
- Forks
- 497
- PR merge metrics
- No merged PRs in 30d
Description
### **bug report**
### What is the current behavior?
If I pass any prop from the [FormState](https://final-form.org/docs/final-form/types/FormState) to the Form instances:
```
import * as React from "react";
import { Form, Field } from "react-final-form";
const F = () => {
return ;
};
export default function App() {
return (
{}}
initialValues={{ x: "xxx", foo: "bar" }}
/>
);
}
```
The form crushes with:
```
TypeError
Cannot set property active of # which has only a getter
```
### What is the expected behavior?
I'd expect the form to ignore prop not present in the FormProps.
### Sandbox Link
https://codesandbox.io/s/active-prop-bug-8qrcw?file=/src/App.tsx
### What's your environment?
final-form@4.20
react-final-form@6.5.0
Contributor guide
Assessment
This issue has not been assessed yet.