question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Form not updating when re-render

See original GitHub issue

Hi there, I have a form called named SettingsForm and when I get the settings from the server and re-render the parent container (SettingsContainer), changing the initialValues of the child form. The form doesn’t do anything. (The new data is reaching the form component by the way…)

Update 1: The form appears to be disconnected from the state, since I cannot change the values.

Update 2: When I click the Submit button and the data reloads, all works.

What’s your environment?

redux-form: 6.5.0
node: 6.9.1
redux: 3.6.0
react: 15.4.2

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
gustavohenkecommented, Mar 13, 2017

Hi @francocorreasosa, please provide us a working example. Start here: http://jsfiddle.net/gustavohenke/48814zsq/

0reactions
lock[bot]commented, Jul 24, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Read more comments on GitHub >

github_iconTop Results From Across the Web

form is not re-rendered when using setValue to update a field ...
Describe the bug When registering fields manually, the form does not re-render after calling setValue. To Reproduce const MyForm ...
Read more >
How to re-render the value of form after updating in React js
I have a simple form and one input field has a dropdown items. When I select one of these , it change the...
Read more >
When does React re-render components? - Felix Gerschau
There are two common reasons why React might not update a component even though its props have changed: The props weren't updated correctly...
Read more >
useForm - setValue - React Hook Form
This function allows you to dynamically set the value of a registered field and have the options to validate and update the form...
Read more >
Why React doesn't update state immediately - LogRocket Blog
State updates in React are asynchronous; when an update is requested, there is no guarantee that the updates will be made immediately.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found