My app has a button that triggers a callback. This callback reads in data from a hidden div/storage component and then clears it.
Users have a habit of clicking buttons multiple times quickly instead of just once, which causes the callback to trigger multiple times in a row.
Under no circumstances do I want to allow the callback to run multiple times in a row.
My idea is to just include a
if storage is None: raise PreventUpdate in the beginning of the callback. This would work if callbacks are evaluated sequentially, so the first trigger of the callback would read the data and then clear the storage so that all callbacks after that would raise the PreventUpdate flag.
This is under the assumption though that callbacks will be evaluated sequentially one after the other. Can I rely on that assumption or should I handle this differently?