final-form / final-form/react-final-form

Unexpected behaviour using onChange in didMount

Open
#259 0 comments 3 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.4k
Forks
497
PR merge metrics
No merged PRs in 30d

Description

### **Bug report**

Bug with latest version of react-final-form (3.4.2)
Calling onChange inside didMount does not update form unless you add some timeout, or await something
https://codesandbox.io/s/034vv927o0

### What is the expected behavior?

Calling onChange inside didMount should update form

(Luckily while creating the sandbox for this example, I forked a repo using react-final-form 1.0.0 && final-form 1.0.0, and I discovered it was working properly on theses versions)
https://codesandbox.io/s/rwmznjp0pm

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.