There are serveal tips I concluded during the migration to Async/Await in the work. Hope them could help you.
- Keep Original Logic
- Keep Original Error Handling
Below showes some example of a vechile sell page.
Keep Original Logic
For the serials API calls based on Promise:
Async/Await version:
For the parallel API calls based on Promise:
Async/Await version:
Keep Original Error Handling
Cache call back based on Promise:
Async/Await version: ⤧ Next post SEO Overview ⤧ Previous post PNG24格式图片转换为PNG8