How to implement bidirectional callback calls in hybrid app? Is there a mature solution?

Much of the

JS code is chained down in the form of Callback.
but in the JS method chain, if you call the methods of iOS and Android, you can only break the chain. Wait for ios and Android to complete the operation, and then call a method of JS to continue the rest of the operation.

doing so will cause the program chain to break and affect the program design.

excuse me, is there a mature solution that allows iOS and Android methods to be called, just like normal JS methods, to be executed sequentially?
I probably have some ideas, but I think there should be a ready-made solution.

Thank you for your help

Mar.16,2021
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4612b-44b79.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4612b-44b79.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?