Are you submitting a bug report or a feature request?
bug
What is the current behavior?
I have many working <Form /> components in a react-native (v0.60) app - as soon as I add decorators prop to Form, i get this error, "update is not a function":
decorators={[
createDecorator({
field: 'department', // when the value of department changes...
updates: {
// ...set field value
subDepartment: -1,
},
}),
]}
Are you submitting a bug report or a feature request?
bug
What is the current behavior?
I have many working
<Form />
components in a react-native (v0.60) app - as soon as I adddecorators
prop to Form, i get this error,"update is not a function"
:What is the expected behavior?
For the decorators to work as expected.
What's your environment?
"final-form": "^4.18.1", "final-form-calculate": "^1.3.1", "final-form": "^4.18.1", "final-form-calculate": "^1.3.1",
Other information
Looks to be the culprit here, but not sure why: https://github.com/final-form/final-form-calculate/blob/bac6a750b7de1c1614996207d0e42ac3958c402d/src/decorator.js#L39
The stack trace only points to the line where
<Form />
is declared in the error:Here is a simple reproducible code snippet one could paste into the
App.js
file with a newreact-native init rffDemo
project from the cli: