omfj / form-state-test

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

useFormState and useFormStatus demo

This is a simple demo of how to use useFormState and useFormStatus hooks.

Actions using useFormState must have a previousState as the first argument. This argument will be omitted in the action returned by the hook.

useFormStatus must be used inside a form. Meaning that the submit button should be its own component.

About


Languages

Language:TypeScript 91.7%Language:JavaScript 6.6%Language:CSS 1.7%