Cathrine
TTCTheo's Typesafe Cult
•Created by Cathrine on 8/14/2023 in #questions
Async event handlers
That is not unlikely 😄
Here's a simplified version of my case.
https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAbzgQzMOBfOAzKERwBEAfgPQCuMwANgM6mrCEDcAUK6JLHAEoCmyAMbxc+OAHIoA4ePZ8AHl3gATPtmTlqI8gDthwCDrgAxGnwCqYahGTKAFAEpErOHEGHa8clZvKAKgowptR8ALKUyFSGcAC8KGgAdNhmCd7WtgHyQSnktGERUTqObC5uHvAAFsg6yiGW6crBfLEotACeenB2fABufDowAFy80jAJAMJVOgDmfACifQMAPAASfqEAMgCSOmCUcyEg-TAAfE4xJ86uru46njhmLb3HCTDIULNjySG0APwJwBgfBAdgADA4Stc4MBsF0AITfZoAHyRDxCrzaYGacJicUIQKypCsyGAOkITgQpShUhg5CgOjYUIw7ChaV8mWyIXCb0KCRABT4dmQAHcSSIUgSYI4IaUMJC4DS6UY7FS4EtSXsYKrXIZJtVZjEEN1FjBzpdKVCoT0IMBlHAprULD5bE1jccZZbMMzPTBMXwYoREYRtShBII+GAYAHJUTqCSyarSCdSg5WBggA
I'm reacting to a file being selected in a file input, and then I'm doing async operations in the handler.
This gives the eslint error about floating promises.
While I've marked the question as solved, I'm interested to hear if there are better, more "react" ways of doing this.
9 replies
TTCTheo's Typesafe Cult
•Created by Cathrine on 8/14/2023 in #questions
Async event handlers
This showed me that you can disable the check for void promises
9 replies