You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Prototyping with remix-hook-form together with optimistic UI in remix, but navigation.formData doesn't appear to populate until after the server responds (instead of immediately upon form submit).
Anyone have thoughts as to why and whether this can be fixed?
i.e. if i add the following to the route component containing the form, I would expect it to console.log the submitted form data as soon as i click submit, but instead, navigation.formData isn't populated with the form submission until after the server responds (e.g. the action finishes executing).
const navigation = useNavigation();
console.log('NAVIGATION FORM DATA', navigation.formData && Object.fromEntries(navigation.formData));
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Prototyping with remix-hook-form together with optimistic UI in remix, but navigation.formData doesn't appear to populate until after the server responds (instead of immediately upon form submit).
Anyone have thoughts as to why and whether this can be fixed?
i.e. if i add the following to the route component containing the form, I would expect it to console.log the submitted form data as soon as i click submit, but instead, navigation.formData isn't populated with the form submission until after the server responds (e.g. the action finishes executing).
Beta Was this translation helpful? Give feedback.
All reactions