Optimistic UI in Remix

The useSubmit Hook just got an upgrade... let's use it to build some optimistic UI in Remix! šŸ”— LINKS Code diff: https://gist.github.com/samselikoff/1... Save 40% on Build UI this week šŸ‘‰ https://buildui.com/pricing šŸ• TIMESTAMPS 0:00 - Intro 0:45 - Removing the pending UI 1:46 - Accessing pending form data with useFetchers 6:30 - Adding optimistic data to the feed 8:16 - Immediately clearing the textarea 10:40 - Submitting the form on Enter 12:44 - Why useFetcher is wrong 14:48 - New API: useSubmit 19:03 - The problem: Race condition 20:10 - The refactor: Client-side UUIDs 29:02 - The solution: Filtering persisted records from the optimistic data 31:42 - Demo 34:15 - Final touch: Saving indicator 36:19 - Black Friday Deal!