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

Infinite loop due initialValue prop

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

Description

👋 Hey, thanks for final-form first of all

**bug report**

### What is the current behavior?
When I pass as an argument a deep object to initialValue prop i get maximum update depth error.

### What is the expected behavior?
I expect to exclude maximum update depth error, how can i fix it?

Correction:
I need to deepEqual of form state instead of shallowEqual, this is very critical for me

### Sandbox Link
See the [SandBox](https://codesandbox.io/s/youthful-wood-0v89x)

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the maximum update depth error in the linked CodeSandbox with a deep object passed to the initialValue prop. Trace the form state comparison involved in the loop and verify that the issue is resolved without changing the expected form behavior; the payload does not name repository files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.