Open l1zard opened 4 years ago
Hi @l1zard
The issue you are having is that you are re-creating the initialValue
list on every-render to infinity.
I solved your issue in this sandbox. (by basically keeping the same array reference for the initial value in state)
This also happen with native Select. CodeSandbox
Are you submitting a bug report or a feature request?
Bug
What is the current behavior?
Infinite re-render (loop) after set initialValues as array []
What is the expected behavior?
No infinite loop
Sandbox Link
https://codesandbox.io/s/busy-bouman-y680m
What's your environment?
Other information
React Final Form's code sandbox