score:0

the issue was that prior to calling useselector on losses, i was doing a dispatch to fetchlosses by using useeffect() method of react-hook-form . found out that the component was not updated. with the new loss values. i need a re-render to update the component

fix:

useeffect(() => {
reset(knownlosses)
}[reset, knownlosses]

i had to call the reset method of useform() to update the form with the newly fetched knownlosses


Related Query

More Query from same tag