#fetcher Submission formData

1 messages · Page 1 of 1 (latest)

spark stirrup
#

const fetcherDelete = useFetcher();
console.log ("state ",fetcherDelete.state);
console.log ("_id ",fetcherDelete.submission?.formData.get("_id"));

In this code the idea is to capture one of the form fields with
fetcherDelete.submission?.formData.get("_id")

The three state are displayed in the console, however as for the _id field just getting undefined repeatedly in the console.

this code is meant to valid but it doesn't work and there is no information on this subject or useTransition() on the internet.

spark stirrup
#

I have achieved my objective by encapsulating the forms into functions thereby taking out the bug and having template code I could use in the future. https://github.com/zahidsom/remix-crud/blob/main/app/routes/Items.tsx How ever I would still like to know , has there been major changes since the video was made two years ago especially useTransition(). Thanks you.

GitHub

remix crud multiple forms in single page. Contribute to zahidsom/remix-crud development by creating an account on GitHub.

golden shore