Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimise promise chaining in asynchronous functions (ES6) #216

Open
krishna9304 opened this issue Jun 6, 2022 · 7 comments
Open

Minimise promise chaining in asynchronous functions (ES6) #216

krishna9304 opened this issue Jun 6, 2022 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@krishna9304
Copy link
Contributor

Description

Using “async - await” instead of “.then” wherever possible.

Reason:

It's better to use async/await where possible, and minimise promise chaining. Async/await makes JavaScript code more accessible to developers that aren't as familiar with JavaScript, and much easier to read.]

Example screenshots

  • Using ".then"

Screenshot 2022-06-06 at 11 30 02 AM

  • Using "async-await"

Screenshot 2022-06-06 at 11 30 26 AM

Status: Discussion required
cc: @Shruti3004 @GMishx @sjha2048

@krishna9304 krishna9304 added the enhancement New feature or request label Jun 6, 2022
@pulkit-30
Copy link

pulkit-30 commented Aug 10, 2022

Hey @krishna9304 @GMishx ,
I want to work on this issue,
May you please tell me what will be the best way to solve or fix this out and also, please assign me this issue. 🚀

@krishna9304
Copy link
Contributor Author

krishna9304 commented Aug 18, 2022

Hello @pulkit-30 , As you can see in the example, we want to minimise promise chaining and use async-await wherever possible in the project. Also, make sure to follow the contribution guidelines from https://github.com/fossology/fossology/blob/master/CONTRIBUTING.md before creating a PR.

@pulkit-30
Copy link

Hello @pulkit-30, As you can see in the example, we want to minimize promise chaining and use async-await wherever possible in the project. Also, make sure to follow the contribution guidelines from https://github.com/fossology/fossology/blob/master/CONTRIBUTING.md before creating a PR.

Great, let's do it 🚀

@GMishx
Copy link
Member

GMishx commented Sep 5, 2022

@krishna9304 @pulkit-30 , one of you want to work on the issue?

@krishna9304
Copy link
Contributor Author

if @pulkit-30 is not working on it, i can pick it up!!

@pulkit-30
Copy link

if @pulkit-30 is not working on it, i can pick it up!!

Yep, I am working on this

@lata-11
Copy link

lata-11 commented Oct 26, 2023

Hi! If this issue is still available, Can I work on it?
@GMishx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants