Источник:
https://butenko.pro/2018/11/13/showi...ync-operation/
==============
Earlier when I had a task to show/hide button based on the result of data-retrieval operation I used following approach – declared variable, made synchronous call to endpoint, set that variable inside the callback and returned true/false result at the end of validation function. It worked but if the operation was long-running it caused blocking ...
Источник:
https://butenko.pro/2018/11/13/showi...ync-operation/