How can you avoid callback hells?

callback hells xss

There are lots of ways to solve the issue of callback hells:

  • modularization: break callbacks into independent functions
  • use a control flow library, like async
  • use generators with Promises
  • use async/await (note that it is only available in the latest v7 release and not in the LTS version 

Also See What is Angular?

Leave a Reply

Your email address will not be published. Required fields are marked *