appwrite / demo-todo-with-react

A basic demo example for integrating between Appwrite & React JS 💙
https://appwrite-todo-with-react.vercel.app
MIT License
200 stars 127 forks source link

Add code to prevent double submission #34

Open gewenyu99 opened 2 years ago

gewenyu99 commented 2 years ago

The form is not disabled as the first submission is handled. This allows the form to be submitted twice if you have fast fingers like me :)

This PR attempts to address this problem using a hook and a fieldset disable. Not sure if this is good practice or antipattern.

vercel[bot] commented 2 years ago

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/appwrite/todo-with-react/5n2h1C4yAwi9oVq6LW2jAZT9YjPB
✅ Preview: https://todo-with-react-git-fork-gewenyu99-fix-double-s-1b17a0-appwrite.vercel.app

brandonroberts commented 2 years ago

I'd recommend just disabling the input field until its finished processing